public static final void main(String[] args) {
String filePath = "D:/Documents/test.txt";
try {
BufferedReader bf = new BufferedReader(new FileReader(new File(
filePath)));
String line;
ListlistNum = new ArrayList ();
while (!"".equals(line = bf.readLine())) {
if (line != null) {
String lineStr = line.toString();
listNum.add(lineStr);
}
}
bf.close();
//再把listNum中的数据依次放入表格中
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}