home *** CD-ROM | disk | FTP | other *** search
- import java.awt.*;
- import java.applet.*;
-
- public class UIApplet extends Applet {
- public void init() {
- setLayout(new BorderLayout());
-
- setBackground(Color.red);
- setForeground(Color.white);
-
- add("North", new Button("North"));
- add("South", new Button("South"));
- add("Center", new Button("Center"));
- add("West", new Button("West"));
- add("East", new Button("East"));
- }
- public boolean action(Event evt, Object arg) {
- showStatus(((Button)evt.target).getLabel());
- return true;
- }
- }
-