try {
String datafile = pathName;
FileReader fin = new FileReader(datafile);
DefaultTableModel m = createTableModel(fin,
new Vector<Object>(Arrays.asList(
new String[] { "a", "b", "c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"})));
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
table = new JTable(m);
f.getContentPane().add(new JScrollPane(table));
f.setSize(200, 300);
f.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
int row = table.getRowCount();
int col = table.getColumnCount();
for(int i=0;i<row;i++){
for(int j=0;j<col;j++){
System.out.println(table.getValueAt(j, i));
}
}