File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Image problems 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 » Applets
Bookmark "Image problems" Watch "Image problems" New topic
Author

Image problems

Chris Hare
Greenhorn

Joined: Mar 30, 2001
Posts: 3
Here's my situation:
-I have an array of images loaded from gifs into an applet with a mediaTracker.
-The applet creates an instance of a gui I made with a frame,etc.
-Using "ImagePanel extends Panel" which I created, I display the images in the gui
Problem:
Some of the images are not appearing while others are.
Reasons? Solutions?
Chris Hare
Greenhorn

Joined: Mar 30, 2001
Posts: 3
Here's some code:
class ImagePanel extends Panel{
Image image;
public ImagePanel(){
super();}
public ImagePanel(Image img){
this();
image = img;}
public void paint(Graphics g){
g.drawImage(image,0,0,this);}
}
Rahul Rathore
Ranch Hand

Joined: Sep 30, 2000
Posts: 324
Maybe MediaTracker is not correctly used to ensure that all images are loaded. Without seeing source-code it is difficult to say what the problem is.
 
Consider Paul's rocket mass heater.
 
subject: Image problems
 
Similar Threads
Servlet and Applet communication
Servlet and Applet communication
applet servlet communication
How I can refresh images in applet
image loading