Text Field not putting data in string and Jlable not repainting
James Eman
Greenhorn
Joined: Mar 10, 2013
Posts: 28
posted
0
ok so at my school we use this website for practice quizes but half the time its down and half the time there a bug or something that crashed and you have to restart. so im trying to write a group of programs that we be the quizes but i have run into a few problems the first is the Jlabel dose not update and second is when you click the button it dose not put the data entered into the textfield into the string. i have just been learning GUIs for a week at most but have been taking classes for Java its self for a littel less then a year so dont hate on my code please its not perfect.
b) in public void GUI_1() you have this
JTextField tf1=new JTextField();
...
pane.add(tf1);
the tf1 in (b) is the one you see on the screen
the tf1 in (a) is the one accessed by the listener (it is not on the screen, so nothing is entered into it)