// Lesson01
// Hello World
// This code is better viewed with tab size=4
import java.applet.Applet;
import java.awt.*;
public class Lesson01 extends Applet
{
Color txtColor; // Text color
public void init()
{
txtColor = Color.black;
}
public void start()
{
}
public void stop()
{
}
public void destroy()
{
}
public void paint(Graphics g)
{
g.setColor(txtColor);
g.drawString("Lesson01",10,20);
g.drawString("Hello World",10,35);
}
public void update(Graphics g)
{
}
}
|