是/否循环使用joptionpane在java中没有正确循环

时间:2017-04-20 21:46:31

标签: java swing joptionpane

adfdjfjbeuojfbbeoufebfiewbfijahnrl9hgljvrjn4lejugrejura

1 个答案:

答案 0 :(得分:1)

public static void main(String[] args) {
    int result = JOptionPane.showConfirmDialog(null, "Play again?", "HINT", JOptionPane.YES_NO_OPTION);
    if (result == JOptionPane.NO_OPTION) {
        System.out.println("No chosen");
    }

    if (result == JOptionPane.YES_OPTION) {
        System.out.println("Picked YES");
    }
}

这是最小的可测试的例子

X = iris.data[:, [2, 3]]

根据您的需求进行调整