import javax.swing.*; // An example illustrating the use of the drop-down form of showInputDialog public class DropDown { public static String[] category = {"Entree", "Side Dish", "Drink"}; public static void main(String[] args) { String selectedCat = (String)JOptionPane.showInputDialog(null, "Choose a menu category", "Input", JOptionPane.INFORMATION_MESSAGE, null, category, category[0]); JOptionPane.showMessageDialog(null, "YOU SELECTED: " + selectedCat); System.exit(0); } }