View Single Post
  #2 (permalink)  
Old 06-29-2009, 03:17 AM
Fubarable's Avatar
Fubarable Fubarable is online now
Moderator
 
Join Date: Jun 2008
Posts: 6,347
Rep Power: 8
Fubarable is on a distinguished road
Default
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.
Reply With Quote