如果用户决定重新运行,如何让java程序再次运行? 你可以像任何其他方法一样调用()/Case>方法,但是考虑到必须重置所有值并关闭任何打开的帧。在学习所有语言基础知识之前,我不建议使用GUI,比如while循环。 int result = JOption
如果用户决定重新运行,如何让java程序再次运行?如果用户决定重新运行,如何让java程序再次运行? 你可以像任何其他方法一样调用()/Case>方法,但是考虑到必须重置所有值并关闭任何打开的帧。在学习所有语言基础知识之前,我不建议使用GUI,比如while循环。 int result = JOption,java,exit,Java,Exit,如果用户决定重新运行,如何让java程序再次运行? 你可以像任何其他方法一样调用()/Case>方法,但是考虑到必须重置所有值并关闭任何打开的帧。在学习所有语言基础知识之前,我不建议使用GUI,比如while循环。 int result = JOptionPane.showConfirmDialog(null, "Do you want to continue the program?",null, JOptionPane.YES_NO_OPTION); if (result == JOpti
你可以像任何其他方法一样调用<代码>()/Case>方法,但是考虑到必须重置所有值并关闭任何打开的帧
。在学习所有语言基础知识之前,我不建议使用GUI,比如while循环。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?
}