This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes update the JVM from 1.5 to 1.6, JDialog background cant paint Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "update the JVM from 1.5 to 1.6, JDialog background cant paint" Watch "update the JVM from 1.5 to 1.6, JDialog background cant paint" New topic
Author

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

endswel shui
Ranch Hand

Joined: Jul 03, 2008
Posts: 33








when I click "hide editor", and I cant see the "1111111111111111111" in the dialog base on jvm 1.6.
but if I click "hide editor", and I can see the "1111111111111111111" in the dialog base on jvm 1.5.

pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Whether it is called in Java 1.5 or 1.6, your code is faulty as you're calling Thread.sleep(...) on the EDT, so it's likely to freeze your app. Why do this rather than use something better like a Swing Timer?

e.g.,



and
endswel shui
Ranch Hand

Joined: Jul 03, 2008
Posts: 33
Thanks pete stein

It works OK.
 
wood burning stoves
 
subject: update the JVM from 1.5 to 1.6, JDialog background cant paint