Add a println next to the statement that creates the textfield. If it prints more than once you have two text fields, one visible and one hidden. If you change the contents of the hidden one you...
Type: Posts; User: Norm
Add a println next to the statement that creates the textfield. If it prints more than once you have two text fields, one visible and one hidden. If you change the contents of the hidden one you...
How many instances of the frame with the textfield do you create? Are they all visible?
I do not think You can have a non window component visible by itself without its containing window being visible.
How many instances of the window/frame class that contains the textfield does the...
Is the textfield whose setText() method you are calling, visible in the GUI?
Is the textfield whose setText() method you are calling, visible in the GUI?
Print out the values of aa and aa.textField where the call to setText() is.
How the class is defined depends on how you are using it. Normally one JFrame is enough.
What do you mean by "applet"? Applet's run from HTML pages in browsers.
Window is a Java SE class. Can you give your class a different name?
You can create as many instances of your window class as you want. If you want to see the contents of any component that is in...
I think you are looking at one window and setting the values for the hidden window.
Change the logic so you set the values for the window you are looking at.
Add a println to your Window (Window is a java SE class???) class's constructor so you can see how many instances of the class you create by the number of times the println prints out its message.
Is there more than on instance of the class that the win variable points to? One is visible and the other, where the call to setText is going, is not.
did you try calling repaint() for the GUI that the text field is shown in?
Otherwise you'll have to post the code for testing.
Why is textField null?
Check that the code gives textField a value. Make sure their is only one variable named textField.
Look at line 61 and find the variable that has a null value. If you can not see which variable is null, add a println just before line 61 that prints out the values of all the variables used on line...
Where do you call any methods to change the contents of the text field where the data is displayed?
Can you explain.
Try calling repaint() after setting the text.