aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Reading file to JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Reading file to JTable" Watch "Reading file to JTable" New topic
Author

Reading file to JTable

Mike Brooks
Greenhorn

Joined: Oct 07, 2007
Posts: 14
Hello, i trying to read a file into a JTable but when i do so instead of getting many different columns I am only get 1. does any one know where i am going wrong

The first line of the data file contains the column names. Fields are separated by the "|" character.

[customers.dat]



[DataFileTableModel.java]


[DataFileTable.java]
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2213
    
    7
Works perfectly for me. I get a table with 4 columns and 4 rows.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading file to JTable