使用此构造函数:
JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue)
其中
options指定按钮,并具有
initialValue(
options值之一)指定默认值。
更新:
您可以致电
showOptionDialog而不是
show/confirm/iDialog。前者采用
options和
initialValue参数。



