How do i make a "Non clickable" option in drop-down JoptionPane message box

63 Views Asked by At
    String[] choices = {"Today", "Tomorrow", **"-------------"**, "Exit"};
    String picked = (String) JOptionPane.showInputDialog (null, "Where to: ", "Travel!", JOptionPane.QUESTION_MESSAGE, null, choices, choices [0]);

How (If there is a way) do i make the "-----------" in String[] choices a non clickable button so i can separate options easier without error messages if they click on the "------------"

If there are any other methods to getting around this, like adding a loop, let me know, im new-ish to java and probably won't know how to make the loop

0

There are 0 best solutions below