/* * ==================================================================== * Create Simple Frame * * Written By : Mark Austin September 1997 * ==================================================================== */ import java.awt.*; public class TestFrame extends Frame { // The main method creates an instance of the class. public static void main( String args[] ) { TestFrame t = new TestFrame(); } // Define window frame. public TestFrame() { setLayout(new GridLayout(2,3,10,10)); // Define 3x2 grid for button layout. // Create buttons and add to the window frame Button buttons[] = new Button [6]; // Array of Button reference variables. for(int ii = 1; ii <= 6; ii++ ) { buttons[ii-1] = new Button ("Button" + ii); add( buttons[ii-1] ); } setTitle("Simple Button Interface"); // Set Frame Title. setSize(400,120); // Size the Frame. show(); // Display the Frame. } public void paint (Graphics g) { // Method for painting } }