Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image problems

 
Chris Hare
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic