- import java.applet.Applet;
- import java.awt.Graphics;
- public class c9_1 extends Applet
- {
- private String s = "WELCOME!";
- private char c[] = {'T','O','a','e','t'};
- private byte b[] = {'d','4','X','I',' 47','A','N'};
- public void paint( Graphics g) //覆盖Applet的成员方法
- {
- g.drawString( s, 50, 25);
- g.drawChars( c, 0, 2, 50, 50);
- g.drawBytes( b, 2, 5, 50, 75);
- }
- }