• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

update the JVM from 1.5 to 1.6, JDialog (modeless) background cant paint

 
endswel shui
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
update the JVM from 1.5 to 1.6, JDialog (modeless) background cant paint,
and set the JDialog modal = false, the Dialog is modeless, but it cant show normal.

so, now if I dont want to use the thread to control it,
i use a time-consuming action. like for loop. it show the issue.


BTW: is that sth wrong here, there is the same issue I put the NativeSwing in JVM5









 
Rob Camick
Ranch Hand
Posts: 2580
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i use a time-consuming action. like for loop. it show the issue.


The loop is executing on the Event Dispatch Thread (EDT) which means the GUI can't repaint itself. You should never execute long running code on the EDT.

Read the section from the Swing tutorial on Concurrency for more information.
 
endswel shui
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI, Rob Camick

It makes me a little confused, I just want to know why in JVM5 can run it.
but JVM6 cant run it.

or both have the issue, just JVM5 paint is not set blank.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
endswel shui wrote:HI, Rob Camick

It makes me a little confused, I just want to know why in JVM5 can run it.
but JVM6 cant run it.

or both have the issue, just JVM5 paint is not set blank.


It doesn't matter why the JVM may run with the code since the code you posted is broken similar to in your previous thread. The solution is not to ask about the JVM but to fix the code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic