File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 2447
Works perfectly for me. I get a table with 4 columns and 4 rows.
I agree. Here's the link:
subject: Reading file to JTable
It's not a secret anymore!