The
Choice
class provides a pop-up menu, from which a single item may be selected at any one time. The label for that item is the one displayed at the location of the choice menu.See the
Choice
class in the java.awt package.Example:
Panel colorPanel = new Panel ( ); Label colorLabel = new Label ( "Favorite Color:"); Choice favoriteColor = new Choice ( );