views:

486

answers:

2

I have CSV data (in fact the values are separated by a tab character, but I can use ; as the separator). The data are stored in a String object.

Is there simple way to create a JTable with this data (without doing it manually by reading and parsing the String object) ?

(note: my project is using Java 1.4, but if you have a solution that needs Java 1.5, I would be happy anyway)

+1  A: 

hello, unless there is a csv -> tablemodel method out there somewhere you will have to write the code to populate the model yourself unfortunately.

phazer
That's what I am looking for ;)I've implemented the manual code for creating this table, but I wanted to see if there was an easier way to do that...
romaintaz
+2  A: 

The TableModelExtTextLoader from swinglabs will do you. It supports both tab and comma separated text.

Pete Kirkham