adrianjohnson
Programmer
I'm developing software which will retrieve some information from a database, but I'd like to have a text field which will be display "Working" whilst the system is getting the data. The user will activate this part by selecting the table name from a JTree.
So, I've added the text field, set it's text, but when the user selects the table name from the JTree, the text field doesn't update. When the system's finished, and I set the text field to "Waiting" - that works ok.
Some example code (off the top of my head, as I'm not at work):
If I print to the bebug window at those points, it works fine - it's just the text field that isn't updated.
Any ideas?
Thanks,
Adrian Johnson
Windows XP Pro SP2, Java 1.5 update 5, NetBeans 4.1
So, I've added the text field, set it's text, but when the user selects the table name from the JTree, the text field doesn't update. When the system's finished, and I set the text field to "Waiting" - that works ok.
Some example code (off the top of my head, as I'm not at work):
Code:
// Set the text in the text field.
lblStatus.setText("Waiting");
// Do something.
// Now get the info from the database.
lblStatus.setText("Working"); // This line not working!
fillTable(); // Call method to get data.
lblStatus.setText("Waiting"); // This line does work.
If I print to the bebug window at those points, it works fine - it's just the text field that isn't updated.
Any ideas?
Thanks,
Adrian Johnson
Windows XP Pro SP2, Java 1.5 update 5, NetBeans 4.1