this.addWindowListener(new WindowAdapter()
{
@Override
public void windowClosing(WindowEvent e)
{
int par1 = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit", "Exit?", JOptionPane.YES_NO_OPTION);
if(par1==JOptionPane.YES_OPTION)
{
System.exit(0);
}
}
});
这是我的代码。如何在JOptionPane requestFocus中设置“否”按钮?Java - 关于JOptionPane的问题
可能复制/相似http://stackoverflow.com/q/1395707/814074 – Sach 2013-03-17 08:36:01
@SachinPasalkar没有,我希望“号“按钮选择 – 2013-03-17 10:44:05
在上面的帖子中阅读用户提出的整个问题。 – Sach 2013-03-17 10:46:53