Results 1 to 4 of 4
Thread: table help
- 06-02-2012, 07:34 AM #1
Member
- Join Date
- Jan 2012
- Posts
- 49
- Rep Power
- 0
table help
I am trying to find a way to add rows to my table. It is a swing jtable. Every example i've seen says that model.insertRow(0,new Object[]{"Ranjan","50"}); should work but it doesn't.
i'm really just completely lost and have no idea since the jdoc doesn't seem to have it in there or i'm looking in the wrong place.Last edited by Reeling; 06-02-2012 at 07:57 AM.
- 06-02-2012, 08:25 AM #2
Re: table help
To get better help sooner, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates the problem. Without that, we would be just guessing what you did wrong, and any suggestions would be likely to be way off the mark.
I can't see where JDBC comes into this.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 06-02-2012, 08:26 AM #3
- 06-02-2012, 08:34 AM #4
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
Re: table help
Yes, you can insert a new row in JTable using DefaultTableModel's insertRow(int row, Object[] rowData). Please show us how you did it, and if you have any error stack trace you can also include it so we can have a better idea.
Website: Learn Java by Examples
Similar Threads
-
Can you compare a list against a table, and see which items aren't in table?
By mydarkpassenger in forum JDBCReplies: 3Last Post: 02-23-2012, 09:30 AM -
How to embed HTML table in lotus notes tabbed table using java?
By mmsmohana in forum New To JavaReplies: 1Last Post: 09-27-2011, 06:06 AM -
table
By NidaSahar in forum JDBCReplies: 5Last Post: 03-16-2011, 09:49 AM -
Copy Default table model to another default table model?
By greatmajestics in forum AWT / SwingReplies: 2Last Post: 04-28-2010, 04:08 PM -
How to repaint.refresh the table (table model) with combo box selection envent
By man4ish in forum AWT / SwingReplies: 1Last Post: 01-08-2010, 06:19 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks