home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-09-15 | 436 b | 21 lines |
- import java.applet.*;
- import java.awt.*;
-
- public class EX16A extends Applet
- {
- protected Button SetColorButton = new Button("Set Color");
- protected Button SetFontButton = new Button("Set Font");
- protected String MyText = new String("This is the text being modified.");
-
- public void init()
- {
- add(SetColorButton);
- add(SetFontButton);
- }
-
- public void paint(Graphics g)
- {
- g.drawString(MyText, 20, 100);
- }
- }
-