Hacer un menu con JOptionPane
public static void main(String[] args) { String selection = JOptionPane.showInputDialog(null, "What is your favourite kind of cheese?", "Cheese Selector", JOptionPane.QUESTION_MESSAGE, null, // Use // default // icon new Object[] { "Brie", "Cheddar", "Gouda", "Roquefort", "Swiss" }, "Cheddar").toString(); switch (selection) { case "Brie": System.out.println("You chose Brie!"); break; case "Cheddar": System.out.println("You chose Cheddar!"); break; } }