View Single Post
  #1 (permalink)  
Old 06-29-2009, 02:57 AM
Edward Edward is offline
Member
 
Join Date: Jun 2009
Posts: 7
Rep Power: 0
Edward is on a distinguished road
Question JTextField won't update from subclass
I have a JTextField and a function in the main class to update it.

I created a separate class to query my database and populate the text field.

I can println the values but when i .setText() to the values, the GUI text field does not update.

However, if I println .getText, it prints the value.

Now, if I call the function from the main class with a hard coded value passed to it, then it updates on the GUI.

Could this be thread related?

Any tips on the best methodology for updating a GUI from DB queries? The last thing I want to do is put all my database calls into the main class. ::shudder::
Reply With Quote