/* ButtonApplet1 is a simple applet that demonstrates how
       to position 3 buttons diagonally via resize(), move(),
       and reshape(). Note that a LayoutManager is NOT used
       in this example. */


       import java.applet.*;
       import java.awt.*;
   
       public class ButtonApplet1 extends Applet {

           Button testButton1;
           Button testButton2;
           Button testButton3;

           public void init() {

               setBackground(Color.pink);

               setLayout(null);     // No LayoutManager

               int width = size().width;  // applet width
               int height = size().height; // applet height

               testButton1 = new Button("one");
               testButton2 = new Button("two");
               testButton3 = new Button("three");

               add(testButton1);
               add(testButton2);
               add(testButton3);

               testButton1.resize(width / 3, height / 3);
               testButton1.move(0, 0);

               testButton2.reshape(width / 3, height / 3,
                                   width / 3, height / 3);

               testButton3.reshape(2 * width / 3, 2 * height / 3,
                                   width / 3, height / 3);
           }
       }