Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- String ExpfileName = "C:/IOTest/expFile.txt";
- File file = new File(ExpfileName);
- String data = readFileAsString(ExpfileName);
- Scanner exp = new Scanner (file);
- exp.useDelimiter(";");
- for (int i = 0; i < expTable.getRowCount(); i++){
- for(int j = 0; j < 4; j++)
- {
- expTable.setValueAt(exp.next(), i, j);
- }
- }
- exp.close();
- }catch(Exception e){
- }
- try{
- String InfileName = "C:/IOTest/inFile.txt";
- String data2 = readFileAsString(InfileName);
- File file2 = new File(InfileName);
- Scanner income = new Scanner(data2);
- income.useDelimiter(";");
- for (int k = 0; k < inTable.getRowCount(); k++){
- for(int l = 0; l < 4; l++)
- {
- inTable.setValueAt(income.next(), k, l);
- }
- }
- income.close();
- }catch(Exception e){
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement