• Post Reply Bookmark Topic Watch Topic
  • New Topic

JApplet and JPanel grey out or freezes  RSS feed

 
s Joshi
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

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.

Thanks.
 
Gernot Greimler
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!