/*
* Copyright (c) 1999-2002, Xiaoping Jia.
* All Rights Reserved.
*/
import java.awt.*;
import java.applet.Applet;
/**
* A simple Java applet. It displays the greeting message "Hello from Saturn!" graphically.
* It consists of a text message and an image of the planet Saturn.
*/
public class Test8 extends Applet {
public void paint(Graphics g) {
Dimension d = getSize();
g.setColor(Color.black);
g.fillRect(0,0,d.width,d.height);
g.setFont(new Font("Tahoma", Font.BOLD, 40));
g.setColor(new Color(250, 100, 0)); // some color
g.drawString("Hello From Saturn!", 5, 40);
g.drawImage(getImage(getCodeBase(), "saturn.jpg"),
50, 50, this);
}
}
|