JOptionPane

生成输入框

String numberString1 = JOptionPane.showInputDialog("Enter the first number: ");

生成消息框

JOptionPane.showMessageDialog(null, number1 + " <= " + number2 + " <= " + number3);

生成确认框

  int answer = JOptionPane.showConfirmDialog(null, "Is your birthday in these numbers?\n" + set1);
  if(answer == JOptionPane.YES_OPTION)
      day += 1;
posted @ 2022-05-11 15:47  Scenery_Shelley  阅读(25)  评论(0)    收藏  举报