I have this code, when run, it is terribly unorganized. It looks like this:
[Label Here] [Button Here]
my program does this:
when something is entered in the JTextField and then you click the [Button Here] then it prints what you printed in the [invisible Label] which is no longer invisible. When you click [Button] it sets the [invisible Label] to have no text in it. is there a way I can set [Button] to be under the [invisible Label] no matter how many spaces it has. What layout would I use and how would I change the JButton code to center it. I tried
JButton name = new JButton ("Name", JButton.CENTER);
but it didn't work. Thanks for the help.
also is there a way to clear a JTextField after a button is pressed?
Edited 5 Years Ago by sirlink99: n/a