import java.applet.*; import java.awt.*; public class AWTcomp extends Applet { public void init() { add(new Label("This is a Label The 3 buttons are active components")); add(new Button("Button 1 ")); add(new Button("Button 2")); add(new Button("Button 3")); add(new Checkbox("Check Boxes and radio buttons enable selections")); add(new Checkbox("You can select as many Check boxes as you want")); CheckboxGroup favs = new CheckboxGroup(); add(new Checkbox("First Radio Button of the group",favs,true)); add(new Checkbox("Second Radio Button of the group",favs,false)); add(new Checkbox("Third Radio Button of the group",favs,false)); add(new Label("Notice that you can only select one radio button.")); List thelist = new List(10,true); thelist.addItem("This is a list box."); thelist.addItem("It allows you to place"); thelist.addItem("Multiple strings in"); thelist.addItem("a list and scroll through"); thelist.addItem("and select any element"); thelist.addItem("that you want."); thelist.addItem("."); thelist.addItem("Choice boxes like the one "); thelist.addItem("below conserve space."); add(thelist); Choice theoptions = new Choice(); theoptions.addItem("First Choice of the Choice Box"); theoptions.addItem("Second Choice of the Choice Box"); theoptions.addItem("Third Choice of the Choice Box"); add(theoptions); TextArea thetext = new TextArea("This is a text area. Just click on it and type.",5,30); add(thetext); add(new Label("The scroll bar can be used to input numeric values.")); Scrollbar thescroll = new Scrollbar(Scrollbar.HORIZONTAL); add(thescroll); } }