Results 1 to 9 of 9
- 07-08-2010, 08:32 PM #1
Member
- Join Date
- Jul 2010
- Location
- Melkbosstrand
- Posts
- 4
- Rep Power
- 0
Add or remove a row on a jtable with Netbeans 6.0
Hello people. Im as using Netbeans 6.0. I created a form with a few combo boxes, radio buttons, labels, button, and a jtable. What im doing is im reading data out of a table in mysql and then i populate the jtable with the data. How it works is the person selects one of the 3 radio buttons, then they click on button to view the results for that selected option. The problem comes in when a long list is being (the "Year" option is selected)displayed and the person chooses another option that brings back a shorter list(the "Week" option is selected). Then the long list remains in the table. Could anyone please help me with a solution?
- 07-08-2010, 08:43 PM #2
Tough. How did you implement your TableModel?
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 07-08-2010, 08:48 PM #3
Member
- Join Date
- Jul 2010
- Location
- Melkbosstrand
- Posts
- 4
- Rep Power
- 0
Implement TableModel
I selected it from netbeans component palette. And I set the Table contents settings as user specified.
- 07-08-2010, 08:52 PM #4
There is a TableModel in the netbeans component palette?!
I suggest you read this tutorial: How to Use Tables (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 07-08-2010, 09:02 PM #5
Member
- Join Date
- Jul 2010
- Location
- Melkbosstrand
- Posts
- 4
- Rep Power
- 0
Implement TableModel
I will go through the tutorial. Thank you for your help.
- 07-08-2010, 09:05 PM #6
You're welcome. Post back if you get stuck.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 07-09-2010, 03:37 AM #7
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,609
- Rep Power
- 5
- 07-12-2010, 06:15 PM #8
Member
- Join Date
- Jul 2010
- Location
- Melkbosstrand
- Posts
- 4
- Rep Power
- 0
Add or remove a row on a jtable with Netbeans 6.0
Thank you for your help I found my problem
tblall.setModel(new javax.swing.table.DefaultTableModel(columnNames, total));
With the same project I want to be able to open one frame with a button on another frame could you please point me in the right direction.
-
Similar Threads
-
JTable netbeans help
By karno in forum NetBeansReplies: 1Last Post: 03-31-2010, 03:45 AM -
Populating JTable with 2 arrays (Netbeans)
By althair in forum AWT / SwingReplies: 3Last Post: 12-30-2009, 02:05 PM -
Netbeans JTable
By sysout in forum NetBeansReplies: 6Last Post: 08-26-2009, 02:27 AM -
How to add new row from JTable comp in netbeans GUI?
By zam in forum NetBeansReplies: 3Last Post: 03-09-2009, 07:37 AM -
Netbeans Jtable
By Manfizy in forum NetBeansReplies: 16Last Post: 11-13-2008, 09:15 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks