|
I think that it's quite possibly thread related. Your database-related code should be performed on a background thread lest it tie up Swing's event dispatch thread or EDT, the single thread responsible for painting Swing apps and for allowing user interaction.
Your database calls should be part of your persistence layer, probably not in a main class or in the GUI layer, and you may wish to consider using SwingWorker objects to help you keep background processes from freezing your GUI.
|