import java.awt.*; public class AwtComponentDemo { public static void main(String[] args) { // Create the main window with a title. Frame myFrame = new Frame("Awt Component Demo"); // Setup the layout to hold up to 8 components each displayed on a row myFrame.setLayout(new GridLayout(8,1)); // Button Button button = new Button("Test"); // Canvas MyCanvas canvas = new MyCanvas(); canvas.setSize(300,40); // Checkbox and CheckboxGroup Panel checkPanel = new Panel(); CheckboxGroup pizzaGroup = new CheckboxGroup(); Checkbox cbLarge = new Checkbox("Large Pan Pizza", pizzaGroup, false); Checkbox cbMedium = new Checkbox("Medium Pan Pizza", pizzaGroup, true); Checkbox cbSmall = new Checkbox("Small Pan Pizza", false); checkPanel.add(cbLarge); checkPanel.add(cbMedium); checkPanel.add(cbSmall); // Choice Choice pizzaChoice = new Choice(); pizzaChoice.add("-- Select Size --"); pizzaChoice.add("Large Pan Pizza"); pizzaChoice.add("Medium Pan Pizza"); pizzaChoice.add("Small Pan Pizza"); pizzaChoice.select("-- Select Size --"); // Label Label label = new Label("TEST LABEL!", Label.CENTER); // List String[] toppings = {"Pineapple", "Pepperoni", "Black Olives", "Mushroom"}; List toppingList = new List(toppings.length-1, false); for ( int i=0; i