jQuery in Action, 2nd edition*
The moose likes Swing / AWT / SWT and the fly likes How can I display an image on an AWT panel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How can I display an image on an AWT panel" Watch "How can I display an image on an AWT panel" New topic
Author

How can I display an image on an AWT panel

Jack Deng
Greenhorn

Joined: May 29, 2004
Posts: 23
I can't use swing, so don't tell me the way of relate to swing
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Jack Deng
Greenhorn

Joined: May 29, 2004
Posts: 23
thank you very much indeed

but I don't understand what is the purpose of use mediatracked in the method of loadimage
[ July 02, 2004: Message edited by: Jack Deng ]
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
getImage returns immediately, ie, it doesn't wait around for the image to fully load. MediaTracker blocks program execution until the image is fully loaded. This becomes more important when you are loading a large image, a series of images or loading over the internet.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How can I display an image on an AWT panel
 
Similar Threads
Progress Bar refreshing!
Good "SWING" Book (s) ???
Progress Bar refreshing!
keyboard equivalent for buttons
JFormattedTextField using NumberFormatter ?