jopen.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setDialogTitle("请选择创建数据库表的文件");
fileChooser.showOpenDialog(null);
}
});
public void actionPerformed(ActionEvent e) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setDialogTitle("请选择创建数据库表的文件");
fileChooser.showOpenDialog(null);
}
});
jopen.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setDialogTitle("请选择创建数据库表的文件");
fileChooser.showOpenDialog(null);
FileInputStream is = null;
try {
is = new FileInputStream(fileChooser.getSelectedFile());
}
catch (FileNotFoundException ex) {
ex.printStackTrace();
}
DataInputStream inData = new DataInputStream(is);
}
});