int result = JOptionPane.showConfirmDialog(null, "Do you want to continue the program?",null, JOptionPane.YES_NO_OPTION);
if (result == JOptionPane.NO_OPTION) {
System.exit(0);
}
if (result == JOptionPane.YES_OPTION) {
// What do i put here to run my program again?
}
答案 0 :(得分:0)
您可以像调整任何其他方法一样调用main()
方法,但考虑您必须重置所有值并关闭所有打开的帧