给领导送礼怎么送:JAVA 中的这一句话哪里不对??

来源:百度文库 编辑:中科新闻网 时间:2024/05/15 09:17:51
private void findPerformed() {
String findString = JOptionPane.showInputDialog(this, );
}

private void findPerformed() {
String findString = JOptionPane.showInputDialog(this, "");
}

其中
this 必须是一个Component组件

JOptionPane.showInputDialog(null, "");
这样也可以

JOptionPane.showInputDialog(this,) 的返回类型不是String ,你检查一下

简单