Refreshing JTable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sibusiso
    New Member
    • Aug 2008
    • 18

    Refreshing JTable

    HI there

    Can anyone help

    I am using netbeans and I populated a Jtable with some data, I have a search button and TextField allowing a user to search for a specific records, but know I want to know how do I then filter the JTable and display records from the results of a user search option

    In short a user has to view records of a specific date on the JTable

    Thanks
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    There is no 'filtering' functionality in a JTable; you have to populate a TableModel with the rows that pass the test and register the model with your table. Read the API documentation.

    kind regards,

    Jos

    Comment

    • samido
      New Member
      • Oct 2007
      • 52

      #3
      a man from my home(RSA) ... dumela...? my solution is ... try to add focus listerner to you JTable object ... hope this will help

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by samido
        a man from my home(RSA) ... dumela...? my solution is ... try to add focus listerner to you JTable object ... hope this will help
        Focus listeners won't help the OP; please read your literature before you add to the OP's confusion.

        kind regards,

        Jos (moderator)

        Comment

        Working...