home *** CD-ROM | disk | FTP | other *** search
/ Java Certification Exam Guide / McGrawwHill-JavaCertificationExamGuide.iso / pc / Web Links and Code / code / chap13 / Border.java < prev    next >
Encoding:
Java Source  |  1997-04-20  |  484 b   |  23 lines

  1. import java.applet.Applet;
  2. import java.awt.*;
  3.  
  4. public class Border extends Applet {
  5.    public void init() {
  6.       Panel p;
  7.  
  8.       setLayout(new BorderLayout());
  9.  
  10.       p = new Panel();
  11.       p.add(new Button("dog"));
  12.       p.add(new Button("cat"));
  13.       p.add(new Button("mouse"));
  14.       add("North", p);
  15.  
  16.       p = new Panel();
  17.       p.add(new Button("steak"));
  18.       p.add(new Button("tuna"));
  19.       p.add(new Button("cheese"));
  20.       add("South", p);
  21.    }
  22. }
  23.