Results 1 to 2 of 2
  1. #1
    hash004 is offline Member
    Join Date
    Jul 2011
    Rep Power

    Default 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 05:22 PM.

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Rep Power


    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

  1. Replies: 2
    Last Post: 05-07-2011, 07:32 PM
  2. JTable with multiple Header
    By bircastri in forum AWT / Swing
    Replies: 1
    Last Post: 11-15-2010, 12:26 PM
  3. Returning a ResultSet to custom JTable Model
    By Kenjitsuka in forum New To Java
    Replies: 9
    Last Post: 10-16-2010, 10:17 PM
  4. Replies: 2
    Last Post: 07-18-2008, 02:13 PM
  5. ResultSet to JTable
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-11-2008, 10:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts