62,614
社区成员
发帖
与我相关
我的任务
分享
Object[] options = { "好", "关闭" };
int n = JOptionPane.showOptionDialog(null,
"Would you like green eggs and ham?",
"A Silly Question",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, // do not use a custom Icon
options, // the titles of buttons
options[0]); // default button title