在GUI表单上需要一些帮助我正在尝试将其用于Excel读写
thanx提前
readexcel read = new readexcel((;
JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());
String line = null;
String name= null;
String INPUT_FILE_LOCATION = null;
List<String> names = new ArrayList<String>();
int returnValue = jfc.showOpenDialog(null);
// int returnValue = jfc.showSaveDialog(null);
if (returnValue == JFileChooser.APPROVE_OPTION) {
File selectedFile = jfc.getSelectedFile();
FileInputStream fis = new FileInputStream(selectedFile);
BufferedReader br = new BufferedReader(new InputStreamReader(fis));
INPUT_FILE_LOCATION = br.readLine();
while ((line = br.readLine()) != null) {
name= line;
names.add(line);
System.out.println("-------------------------------------------------------------------------------------------------------------------------------------------------");
System.out.println("name is:::" + name);
System.out.println("-------------------------------------------------------------------------------------------------------------------------------------------------");
}
System.out.println(selectedFile.getAbsolutePath());
}
read.getData(INPUT_FILE_LOCATION, IS_SERVICES);
System.out.println("IS_SERVICES::: " + IS_SERVICES.size());