• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading file to JTable

 
Mike Brooks
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2565
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works perfectly for me. I get a table with 4 columns and 4 rows.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic