This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTable-putting data in columns and rows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable-putting data in columns and rows" Watch "JTable-putting data in columns and rows" New topic
Author

JTable-putting data in columns and rows

wip siva
Ranch Hand

Joined: Nov 03, 2000
Posts: 36
hi friends
i am storing livedata in a file.from that i have to fetch approriate data for a particular rows and columns.i have to display on table in a periodic interval.
plz anyone can helpme in this .thanx in advance.plz give me if u
have code also.
thanx
regards
siva
Vidyadhar Hegde
Greenhorn

Joined: Oct 24, 2000
Posts: 11
Hi Siva,
What type of the file are you using?
If it is from database file I do have the answer.
Selva P
Greenhorn

Joined: Oct 24, 2000
Posts: 11
hai,
you can use DefaultTableModel for this purpose. Override methods like getColumnCount(), getRowCount(), getValueAt(). you should implement this metods with code necessary for retreving from the file and returning some values as per the method definition..
Hope this would serve your purpose.
bye


Sun Certified Java 2 Programmer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable-putting data in columns and rows