| View previous topic :: View next topic |
| Author |
Message |
udayKIRAN Posted via mailing list.
|
Posted: Wed Aug 12, 2009 11:48 am Post subject: how to add rows to the table that i already created |
|
|
i have a table with two columns..one column has cheskboxes and the other has
strings.i want to add rows dynamically to this table as user enters
data..the data is entered in the form of string in second column and first
column should contain checkbox..how can i do this??
--
View this message in context: http://www.nabble.com/how-to-add-rows-to-the-table-that-i-already-created-tp24934793p24934793.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com. |
|
| Back to top |
|
 |
Bayless Kirtley Posted via mailing list.
|
Posted: Wed Aug 12, 2009 2:07 pm Post subject: how to add rows to the table that i already created |
|
|
You don't add rows directly to the JTable a run time. They have to be added
to the TableModel which will then automatically update the JTable.
Bayless
----- Original Message -----
From: "udayKIRAN" <address-removed>
To: <address-removed>
Sent: Wednesday, August 12, 2009 6:48 AM
Subject: [nbusers] how to add rows to the table that i already created
|
|
| Back to top |
|
 |
Melongo Annabel Posted via mailing list.
|
|
| Back to top |
|
 |
udayKIRAN Posted via mailing list.
|
|
| Back to top |
|
 |
Franz Posted via mailing list.
|
Posted: Thu Aug 13, 2009 7:00 pm Post subject: how to add rows to the table that i already created |
|
|
udayKIRAN schrieb:
| Quote: | i have a table with two columns..one column has cheskboxes and the other has
strings.i want to add rows dynamically to this table as user enters
data..the data is entered in the form of string in second column and first
column should contain checkbox..how can i do this??
|
Get the model from your table and modify the model.
If you haven't set the model explicitly, you'll have to cast the model
(most likely to a DefaultTableModel) before using it.
Regards
Franz
PS: is there a mailinglist FAQ? I think, I've read this kind of question
several times in the last weeks. |
|
| Back to top |
|
 |
Melongo Annabel Posted via mailing list.
|
Posted: Fri Aug 14, 2009 1:56 am Post subject: how to add rows to the table that i already created |
|
|
Is is web application or GUI application?
From: udayKIRAN <address-removed>
To: address-removed
Sent: Thursday, August 13, 2009 6:12:01 AM
Subject: Re: [nbusers] how to add rows to the table that i already created
is it possible to do it using netbeans...as i have to code it in java
View this message in context: Re: how to add rows to the table that i already created
Sent from the Netbeans IDE Users mailing list archive at Nabble.com. |
|
| Back to top |
|
 |
udayKIRAN Posted via mailing list.
|
Posted: Fri Aug 14, 2009 10:28 am Post subject: how to add rows to the table that i already created |
|
|
thanks..got it
Franz Graf wrote:
| Quote: |
udayKIRAN schrieb:
| Quote: | i have a table with two columns..one column has cheskboxes and the other
has
strings.i want to add rows dynamically to this table as user enters
data..the data is entered in the form of string in second column and
first
column should contain checkbox..how can i do this??
|
Get the model from your table and modify the model.
If you haven't set the model explicitly, you'll have to cast the model
(most likely to a DefaultTableModel) before using it.
Regards
Franz
PS: is there a mailinglist FAQ? I think, I've read this kind of question
several times in the last weeks.
|
--
View this message in context: http://www.nabble.com/how-to-add-rows-to-the-table-that-i-already-created-tp24934793p24969557.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com. |
|
| Back to top |
|
 |
Glaursen
Joined: 20 Aug 2009 Posts: 8 Location: Phoenix
|
Posted: Thu Aug 20, 2009 4:23 pm Post subject: |
|
|
I'm trying to do the same thing. Can you please provide a code snippet to show what you are describing below? I have a Table1 component and want to know how to get my model from the table.
| Quote: | Get the model from your table and modify the model.
If you haven't set the model explicitly, you'll have to cast the model
(most likely to a DefaultTableModel) before using it.
|
|
|
| Back to top |
|
 |
|