Reputation: 31
Populating JTable
using FileReader
I have looked over the Internet, however, have been unsuccessful in finding a good tutorial or example.
Upvotes: 0
Views: 171
Reputation: 347184
Your basic problem is a translation problem. How to get from state A to state B. You need to get the contents of the file into a state that it will be possible to wrap it in a TableModel
of some kind.
I would start with
Once you have the ability to read the file and store it's content in some meaningful manner (I'd create a nice class that was capable of handling the data for each row and place them all into something like an ArrayList
, but that's me), then I'd work out how to get that data into the table.
Once you have the data in some kind of structure, getting into the table is relatively simple.
Upvotes: 1