Results 1 to 4 of 4
Thread: feeding map into jtable
- 01-27-2011, 11:22 AM #1
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
feeding map into jtable
Hi
I want to feed a jtable with my datastructure map
in java tutorials i found the followingJava Code:Map<Object , List<Object>> myMap;
My question is :Java Code:There are two JTable constructors that directly accept data (SimpleTableDemo uses the first): * JTable(Object[][] rowData, Object[] columnNames) * JTable(Vector rowData, Vector columnNames)
Should iterate over the map and read each List . Convert the List to Vector and then add it ?
There is also another approach i.e. to add Vector ( row data ) directly into the DataModel
Which is best approach ?
Regards
kmm
- 01-27-2011, 11:26 AM #2
Hi, I think that best approach is implement AbstractTableModel and it use in JTable.
Skype: petrarsentev
http://TrackStudio.com
- 01-27-2011, 12:54 PM #3
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
defaulttable model and abstract table model
Hi
thanks for that
what s the difference between defaulttable model and abstract table model ?
- 01-27-2011, 01:26 PM #4
defaulttable extend abstracttable. It use Vector to store the cell value objects.
Skype: petrarsentev
http://TrackStudio.com
Similar Threads
-
regarding deletion of spoon-feeding post
By Fubarable in forum Forum LobbyReplies: 7Last Post: 03-18-2010, 01:46 PM -
Adding New JTable in JTable
By anilkumar_vist in forum New To JavaReplies: 0Last Post: 01-27-2010, 08:27 AM -
JTable help
By FFEJ in forum New To JavaReplies: 5Last Post: 10-05-2009, 11:30 PM -
Broken pipe exception while feeding a console's inputstream from a non-finished file
By Andy09 in forum Advanced JavaReplies: 1Last Post: 09-10-2009, 01:58 PM -
Jtable duplicates through Hashtable (JTable condition problem) my assignment plz help
By salmanpirzada1 in forum Advanced JavaReplies: 2Last Post: 05-15-2008, 10:15 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks