标签: loops while-loop joptionpane
我想知道如何合并此代码片段,并使其正确显示,以便当用户单击“是”时,程序将重新运行,直到用户在while循环中单击“否”为止。
(JOptionPane.showConfirmDialog(null, "Would you like to run the program again?", "TestProgram", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {