我只需要在showConfirmDialog
中只有一個按鈕。JOptionPane 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。
我只想在那裏顯示OK按鈕。可能嗎?
確定生病讓你知道 –
感謝奏效.. :) –