aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Problem with filtering JTable (AbstractTableModel) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with filtering JTable (AbstractTableModel)" Watch "Problem with filtering JTable (AbstractTableModel)" New topic
Author

Problem with filtering JTable (AbstractTableModel)

Liana Norpunova
Greenhorn

Joined: Aug 24, 2010
Posts: 23
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?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

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:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Liana Norpunova
Greenhorn

Joined: Aug 24, 2010
Posts: 23
Thank you. I've changed the code as you have proposed, however the problem remains...((

Liana Norpunova
Greenhorn

Joined: Aug 24, 2010
Posts: 23
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!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with filtering JTable (AbstractTableModel)