Results 1 to 2 of 2
Thread: Multiple Resultset in Jtable
- 07-17-2011, 06:18 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 10
- Rep Power
- 0
Multiple Resultset in Jtable
Hi guys,
I'm new to this forum so please go easy on me. I've been browsing around but can't seem to find a solution to my problem. I've attached a resultset to a jtable so it displays the specific database table in the jtable. the problem is I want to add a search feature (a combo box to choose what the user wants to search by, textfield with a search button), so once the search button is pressed the jtable is populated with only the searched results.
I've attached the class with the problem. I've using netbeans so thats why the code might seem a little weird. by the way I used the following tutorial to display the resultset in the jtable in the first place:
Any help would be appreciated, even a notch in the right directions.Last edited by hash004; 08-14-2011 at 04:22 PM.
- 07-17-2011, 09:14 PM #2
Senior Member
- Join Date
- Jul 2009
- Posts
- 1,145
- Rep Power
- 5
Most people on the forum will not take the time to download a zip file.
If you want help you need to post a Short, Self Contained, Correct Example
Without looking at your code I would say the solution is to replace the TableModel in the table:
Java Code:TableModel model = new .... table.setModel( model );
Similar Threads
-
populating jtable with resultSet - help needed
By smallmos1 in forum JDBCReplies: 2Last Post: 05-07-2011, 06:32 PM -
JTable with multiple Header
By bircastri in forum AWT / SwingReplies: 1Last Post: 11-15-2010, 11:26 AM -
Returning a ResultSet to custom JTable Model
By Kenjitsuka in forum New To JavaReplies: 9Last Post: 10-16-2010, 09:17 PM -
Can i use the same statement and resultset objects for executing multiple query?
By RadhaJayalakshmi in forum JDBCReplies: 2Last Post: 07-18-2008, 01:13 PM -
ResultSet to JTable
By Java Tip in forum Java TipReplies: 0Last Post: 02-11-2008, 09:01 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks