例:
jButton1_actionEvent(){
String inodbc=JOptionPane.showInputDialog(this,"","",JOptionPane.PLAN_MESSAGE);
String intable=JOptionPane.showInputDialog(this,"","",JOptionPane.PLAN_MESSAGE);
}
这里面的一些代码有些忘了,但主要的就是我想从中把两个JOptionPane中的数据提取出来,提取其中的inodbc 和 intable,具体怎么做呀?
jButton1_actionEvent(){
String inodbc=JOptionPane.showInputDialog(this,"","",JOptionPane.PLAN_MESSAGE);
String intable=JOptionPane.showInputDialog(this,"","",JOptionPane.PLAN_MESSAGE);
}
这里面的一些代码有些忘了,但主要的就是我想从中把两个JOptionPane中的数据提取出来,提取其中的inodbc 和 intable,具体怎么做呀?
这样,您就可以在此方法的外部它了。我也是初学者,错了不要怪我,呵呵
public class a {
String inodbc , intable ;
}
jButton1_actionEvent(){
inodbc=JOptionPane.showInputDialog(this,"","",JOptionPane.PLAN_MESSAGE);
intable=JOptionPane.showInputDialog(this,"","",JOptionPane.PLAN_MESSAGE);
}
别的方法也是有的,
在joptionpane中,如果它的属性改变的话,你可以通过一个函数得到改变值,不过烦了点。