Are you doing any computationally intensive task on the event-dispatcher
thread?
In Swing, lengthy initialization tasks (e.g. I/O bound and computationally expensive tasks), should not occur in the event-dispatching thread because this will hold up the dispatcher thread. If you need to create a new thread for example, to handle a job that�s computationally expensive or I/O bound then you can use the thread utility classes such as SwingWorker or Timer without locking up the event-dispatching thread.
�SwingWorker � creates a background thread to execute time consuming operations.
�Timer � creates a thread that executes at certain intervals.