/* * ==================================================================== * Create Simple GUI with six choice buttons. * * Written By : Mark Austin September 1997 * ==================================================================== */ import java.awt.*; public class TestChoice { public static void main( String args[] ) { // Define window frame. Frame f = new Frame(); f.setLayout(new FlowLayout()); int iNoAlternatives = 10; // Create choice buttons and add to frame Choice choiceBox = new Choice (); for(int ii = 1; ii <= iNoAlternatives; ii++ ) { choiceBox.addItem("Alternative " + ii); } f.add( choiceBox ); f.resize(400,120); f.show(); } }