Update form content...

txtField.setText("This is new text");

does not refresh when I call frame.repaint() it still shows the text the form had when it loaded before I called .show(). I'm pretty new to java forms and don't know how to udpate the form so the text values change once the form is loaded.

Just to be clear:

1. I instance the form.
2. I fill in the textFields with text (and this works).
3. I show the form and it looks right.
4. I run some tasks and try to update the text on the form using field.setText() and then call repaint() but it's not having the effect I want.

I know I'm doing something stupid.

Ideas?

Thanks,

Rex

1 comment
Comment actions Permalink

You should ask this on the JavaDesktop Swing forums at http://www.javadesktop.org/forums/forum.jspa?forumID=2

txtField.setText("This is new text");

does not refresh when I call frame.repaint() it still shows the text
the form had when it loaded before I called .show(). I'm pretty new to
java forms and don't know how to udpate the form so the text values
change once the form is loaded.

Just to be clear:

1. I instance the form.

2. I fill in the textFields with text (and this works).

3. I show the form and it looks right.

4. I run some tasks and try to update the text on the form using
field.setText() and then call repaint() but it's not having the effect
I want.

I know I'm doing something stupid.

Ideas?

Thanks,

Rex




0

Please sign in to leave a comment.