aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes update the JVM from 1.5 to 1.6, JDialog (modeless) background cant paint Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "update the JVM from 1.5 to 1.6, JDialog (modeless) background cant paint" Watch "update the JVM from 1.5 to 1.6, JDialog (modeless) background cant paint" New topic
Author

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

endswel shui
Ranch Hand

Joined: Jul 03, 2008
Posts: 33
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

Joined: Jun 13, 2009
Posts: 2200
    
    7
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

Joined: Jul 03, 2008
Posts: 33
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

Joined: Feb 23, 2007
Posts: 1561
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: update the JVM from 1.5 to 1.6, JDialog (modeless) background cant paint