/* ** BorderExample sample applet ** ** by (c) Copyright 2001 Simon Huggins ** ** For demonstration purposes only. ** ** You may use this applet on your web site, but it cannot be ** sold in either its original or altered state. ** This original notice must be included in all versions of ** the applet distributed, even if altered. ** ** The author accepts no liability for any difficulties or loss ** arising from use of this applet. It is primarily intended for ** demonstration purposes. ** ** Change History ** ~~~~~~~~~~~~~~ ** 07-Oct-2001 v1.0 Release version */ /* ** Import section - tells the compiler where to look for different classes ** used within this file */ import javax.swing.*; import java.awt.*; /* ** Defines a class called BorderExample which takes the basic JApplet ** class as a template, and adds to it to create our Applet. */ public class BorderExample extends JApplet { /* ** Initialize the applet - i.e. set up any values before processing begins */ public void init() { getContentPane().setLayout(new BorderLayout()); getContentPane().add(new JButton("BorderLayout.NORTH" ), BorderLayout.NORTH ); getContentPane().add(new JButton("BorderLayout.SOUTH" ), BorderLayout.SOUTH ); getContentPane().add(new JButton("BorderLayout.EAST" ), BorderLayout.EAST ); getContentPane().add(new JButton("BorderLayout.WEST" ), BorderLayout.WEST ); getContentPane().add(new JButton("BorderLayout.CENTER"), BorderLayout.CENTER); // getContentPane().add(new JButton("BorderLayout.NORTH" )); // getContentPane().add(new JButton("BorderLayout.SOUTH" )); // getContentPane().add(new JButton("BorderLayout.EAST" )); // getContentPane().add(new JButton("BorderLayout.WEST" )); // getContentPane().add(new JButton("BorderLayout.CENTER")); } }