Is there a way to only have the OK button in a JOptionPane showInputDialog (and no CANCEL button)?

后端 未结 3 1716
挽巷
挽巷 2020-12-16 05:35

I\'ve seen that this is possible in other types of dialog windows such as \"showConfirmDialog\", where one can specify the amount of buttons and their names; but is this sam

3条回答
  •  孤街浪徒
    2020-12-16 06:26

    Try:

    JOptionPane.showMessageDialog(frame, "Eggs are not supposed to be green.");
    

    I found in here

提交回复
热议问题