Questions tagged as 'jtextfield'

2
answers

How to access static jTextField created with swing?

So, guys, I have a jTextField that works normally, but when I put it as static setText does not work anymore, and I need it static because I do the same for a function, I did it without swing and it worked out I do not kn...
asked by 14.03.2014 / 13:44
1
answer

Problem with timer in Java

Explanation: I have a JTextField component that would be a countdown timer, but when I use ActionListener this way: public static ActionListener alredBGolem = new ActionListener() { public void actionPerformed(ActionEvent e...
asked by 18.02.2014 / 18:05
1
answer

Decorating a JTextField with an icon

My question is whether it is possible to "decorate" a field, such as JTextField or JFormattedTextField, with an icon. An example would look something like this: Following an example, I made the following class. package componentes;...
asked by 09.12.2016 / 23:36
1
answer

How to add values in the JTextField via the button without deleting the previous value?

My problem is that I placed a button so that when it was clicked, I would add the value 1 to JTextField . But when I click again, it replaces the value, and what I wanted was for it to add another type 1 , I click once on t...
asked by 01.01.2017 / 21:39
1
answer

Change JTextField value from another class or automatically

I found some similar issues in the English version, but I could not resolve it. I have a Boiler class, with the following attributes: Boiler temperature; Water quantum; Fire temperature; In this program I will have to keep the boil...
asked by 14.08.2018 / 18:26
2
answers

Transparent background in java

I have a problem with background transparent of a JTextField , changing the content of JTextField it seems to overlap the text and everything is mixed: I'msettingthebackgroundlikethis:Field.setBackground(newColor(1.0f,1.0f...
asked by 18.02.2014 / 19:35
1
answer

"Transparent" text in java

I wanted to make a text like this: Thistext"transparent" when clicked it disappears and if you can start writing in dialog ... does anyone know how to do this in Java? Help me out!     
asked by 13.03.2015 / 02:47
1
answer

How to leave only one border in JTextField?

I would like to know how to just leave a border in a JTextField , similar to the data entry at the time of logging in Gmail, that is, with a border just at the bottom.     
asked by 14.07.2017 / 01:37
1
answer

Currency mask for JTextField

I have a JTextField field that should receive a monetary value from the user. I would like to add a mask to this field so that it will format the values entered as follows: 9999.99.     
asked by 19.11.2014 / 19:26
2
answers

JTextField null field validation

On my system, I have a window and a controller, but for some reason, it is never throwing the error, as expected: Method that performs validation: private void validacao(){ if((form.txtNome.getText() != null) && (form.txtEnd.get...
asked by 07.04.2016 / 23:06