I am using JApplet. When I click a button on JApplet, a JPanel with TextArea opens. I type in a query in the JTextArea and hit the button. The Action Listener of the button opens a JDBC Connection and runs the query. The query takes long time to finish. If I minize my Applet or Panel window during this time and then maximize it, my Panel and applet are greyed out. Once the query finishes, I can again see the textarea, buttons and everything.
I tried to increase the heap size of JVM, but no success.
Any help is appreciated.
posted 11 years ago
as far as i know actionlisteners use the same "thread" as the window paint methods - maybe try starting a thread with your JDBC query and just "lock" UI until it is finished