• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with filtering JTable (AbstractTableModel)

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello! I have a problem with filtering JTable (AbstractTableModel)... So, this is my code:



When I type some char in the textfield, then the table is filtered incorrectly. For example, I can get the word "Fellow" after typing the char "g". I cannot understand why it happens. Pliz any suggestions?
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Liana Norpunova wrote:Pliz any suggestions?


Please UseRealWords: "please".

I'm moving this to our GUI forum. In the mean time you could try re-setting the row sorter:
 
Liana Norpunova
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you. I've changed the code as you have proposed, however the problem remains...((

 
Liana Norpunova
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I've solved the problem. This is my code for multiple filters for JTable, maybe one day it will be useful for someone:



Thanks!
 
reply
    Bookmark Topic Watch Topic
  • New Topic