This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Reading file to JTable" Watch "Reading file to JTable" New topic

Reading file to JTable

Mike Brooks

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.



Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2152
Works perfectly for me. I get a table with 4 columns and 4 rows.
subject: Reading file to JTable
Similar Threads
jtable, table model, column headers
Readind and Writing Contents of JTable in txt file
Timer not happening in this example
JTable Dynamic - Urgent