/* ** GridExample 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 GridExample which takes the basic JApplet ** class as a template, and adds to it to create our Applet. */ public class GridExample extends JApplet { /* ** Initialize the applet - i.e. set up any values before processing begins */ public void init() { getContentPane().setLayout(new GridLayout(2,3)); for (int i=0;i<(2*3);i++) getContentPane().add(new JButton("Button "+Integer.toString(i))); } }