Java:如何在JOptionPane.showInputDialog中编辑按钮位置?

时间:2017-03-10 17:53:50

标签: input dialog show joptionpane

如何在弹出的JOptionPane.showInputDialog中编辑按钮位置?

您是否可以在参数中添加参数?

  String inputValue = JOptionPane.showInputDialog(frame.getFrame(), "Please enter a value from 1 to 9");

  if (inputValue == null) { // Cancel button
    return 0;
  }

1 个答案:

答案 0 :(得分:0)

显然我只需要添加额外的参数来使它成为一个简单的信息,但是如何重新定位按钮呢?

String inputValue = JOptionPane.showInputDialog(frame.getFrame(), "Please enter a value from 1 to 9","", JOptionPane.PLAIN_MESSAGE);
相关问题