JAVA 的jFileChooser问题
JAVA的jFileChooser问题,当我按下按钮,出来是打开和取消,我要把打开换成确定,怎么般?因为我是要获得储存路径publicvoidjButton6_actio...
JAVA 的jFileChooser问题,当我按下按钮,出来是打开和取消,我要把打开换成确定,怎么般?因为我是要获得储存路径
public void jButton6_actionPerformed(ActionEvent e) {
File f1 = new File("c:\\");
JFileChooser jFileChooser1 = new JFileChooser(f1);
int result;
result = jFileChooser1.showOpenDialog(this);
if (result == jFileChooser1.APPROVE_OPTION) {
File file = jFileChooser1.getSelectedFile();
System.out.println(jFileChooser1.getSelectedFile().getPath());
} 展开
public void jButton6_actionPerformed(ActionEvent e) {
File f1 = new File("c:\\");
JFileChooser jFileChooser1 = new JFileChooser(f1);
int result;
result = jFileChooser1.showOpenDialog(this);
if (result == jFileChooser1.APPROVE_OPTION) {
File file = jFileChooser1.getSelectedFile();
System.out.println(jFileChooser1.getSelectedFile().getPath());
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询