wood burning stoves 2.0*
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
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: 2153
    
    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.
 
wood burning stoves
 
subject: update the JVM from 1.5 to 1.6, JDialog (modeless) background cant paint
 
Similar Threads
My download app got problems CPU 99
Problems loading image into a JLabel located in a JScrollPane
KeyListener not working for JLabel.
Using NativeSwing, I open the JDialog, the background is blank, and I cant change it
update the JVM from 1.5 to 1.6, JDialog background cant paint