Example #1
0
  // TextArea Text;
  public void init() {

    // Tell the applet not to use a layout manager.
    setSize(500, 500);
    setLayout(null);

    // initialze the button and give it a text.
    Rubric = new Button("Rubric Editor");
    GradeSheet = new Button("Grade Sheet Editor");
    TextArea text = new TextArea("Please Choose one of the following");

    // now we will specify the positions of the GUI components.
    // this is done by specifying the x and y coordinate and
    // the width and height.
    Rubric.setBounds(100, 275, 100, 30);
    GradeSheet.setBounds(230, 275, 150, 30);
    text.setBounds(100, 225, 300, 50);
    text.setEditable(false);
    (text).getScrollbarVisibility();
    // now that all is set we can add these components to the applet
    add(text);
    add(Rubric);
    add(GradeSheet);
    Rubric.addActionListener(this);
    GradeSheet.addActionListener(this);
  }