我只需要在 showConfirmDialog
中有一个按钮。
我试过这个:
int response = JOptionPane.showConfirmDialog(null, "Time Entered Successfully",
"", JOptionPane.OK_OPTION, JOptionPane.PLAIN_MESSAGE);
if (response == JOptionPane.CLOSED_OPTION || response == JOptionPane.OK_OPTION)
{
System.out.println("CLOSING>>>>>>");
}
但这显示带有 Yes_No_option 的对话框。
我只想在那里显示确定按钮。可能吗?
最佳答案
尝试使用它,它只创建一个按钮
JOptionPane.showMessageDialog(null, "Loading Complete...!!!");
关于java - JOptionPane showConfirmDialog 只有一个按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11204878/