/*
Chapter 2:
Welcome to My Day
Programmer: Brad Shedd
Date:
April 10, 2006
Filename:
WelcomeApplet.java
Purpose:
This project displays a welcome
message, the user's name, and the system date, and a image, in a console Applet.
*/
import java.util.Date;
import java.awt.*;
import java.applet.*;
public
class
WelcomeApplet
extends Applet
{
public
void paint(Graphics g)
{
Date
currentDate =
new
Date();
// Date constructor
g.drawString("Welcome
to my day!",200,70);
g.drawString("Daily
Planner for Brad Shedd",200,100);
g.drawString(currentDate.toString(),200,130);
Image
smile;
// declare an Image object
smile = getImage(getDocumentBase(),
"Smile.gif");
g.drawImage(smile,10,10,this);
setBackground(Color.cyan);
}
// end of
main method
}
// end of welcome class
//The image you choose needs to be in the same folder as java file.