Java Example Program / Sample Source Code
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
public class SetcolorApplet extends Applet {
public void init() {
setBackground(Color.blue);
}
public void paint(Graphics g) {
g.drawString("Hello World in blue background", 200, 100);
}
} |
|
|