I have a program that takes in log files, parses them, and inserts rows to a database that it connects to on startup. The GUI consists of two JButtons (one for importing and one for displaying data) and a JLabel to display the status.
Normally the GUI updates fine all the time (JLabel text change and disabling buttons), but when the program is inserting rows into the table, the whole GUI freezes until the operation completes, skipping all the UI changes that I make.
Is there any way to update the UI while I'm accessing the database?
Thanks for the quick and useful reply.
I've gone through that, and I'm having little but of trouble understanding how to implement this. I currently have a main class that has the GUI and action listeners, and another that handles the database, including connecting and inserting.
Would the database class be a SwingWorker?
What do you recommend that I should do/how do you think I should implement it?