【问题标题】:Java: How edit button positions in JOptionPane.showInputDialog?Java:如何在 JOptionPane.showInputDialog 中编辑按钮位置?
【发布时间】:2017-03-10 17:53:50
【问题描述】:

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

是否有参数可以放入参数中?

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

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

【问题讨论】:

    标签: input dialog show joptionpane


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-02
      • 2020-08-09
      • 2011-05-07
      • 2021-02-10
      相关资源
      最近更新 更多