Simple java applet will not display my image

September 30, 2010 at 17:40:08
Specs: Windows 7
Here is my code. Can you help me figure out why it won't work? Applet displays fine, but the image will not show. THANK YOU!

import java.util.Date;
import java.awt.*;
import java.applet.*;

public class WelcomeApplet extends Applet
Image smile; //declare an Image object
public void paint(Graphics g)
Date currentDate = new Date(); // Date constructor
g.drawString("Welcome to my day!",200,70);
g.drawString("Daily planner for Linda Nunez",200,100);
smile = getImage(getDocumentBase(),"Smile.gif");
g.drawImage(smile, 10, 10,this);

See More: Simple java applet will not display my image

Report •

December 4, 2010 at 11:42:57
I have this similar problem. Were you able to figure out the answer now? I'm checking this post about java not displaying.

Report •
Related Solutions

Ask Question