File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Graphics and JVMs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Graphics and JVMs" Watch "Graphics and JVMs" New topic

Graphics and JVMs

T H Lim

Joined: Oct 14, 2004
Posts: 28
I have written this small test code to show the difference in the graphical output of 2 different JVMs i.e. Apple JDK 1.5.0 and Windows JDK 1.5.0_13. When I execute this code in Apple JVM, I can see the message "Hi There" quite clearly. Whereas, in Windows JVM, the message is harder be seen if I set Thread.sleep to 100. If I increase the sleep period, I could see a blinking "Hi There" message. Is this has to do with the way I have written the code (probably, I am missing something here) or the JVMs implementation? Either way, how can make this work the way I wanted it? Please advise. Thanks.

Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
T H Lim

Joined: Oct 14, 2004
Posts: 28
I would prefer the message outside of JPanel. I want the message to be on top of the JPanel. After listening to the kind advices given, this is what I come up with.

I agree. Here's the link:
subject: Graphics and JVMs
Similar Threads
Proper way to override painting on a JFrame
Using custom panel in NetBeans GUI builder
Multiple applets invocation from single applet
Adding resizable components to JPanel
Swing: Slow paint