aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTable filter with RegexFilter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable filter with RegexFilter" Watch "JTable filter with RegexFilter" New topic
Author

JTable filter with RegexFilter

Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
hi there. im trying to code a filter for my database JTable

i found a sample from java.sun . looks like this..



the filter works, but seems to be wrong.
what i want is the filter to accept at least 3 letters of a word to start filtering...

can you provide me some sample? or just modify the code above?

thank you very much..

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10248
    
    8



[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
Maneesh Godbole wrote:


thanks for this..

i gave it a try,

and found out something missing with the code.



the "(?i)" fixed it for me.
can i ask what that string is for?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

Check java.util.regex.Pattern. It says it all.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10248
    
    8

"?i" indicates case insensitive matches
http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#CASE_INSENSITIVE
Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
thanks for the info, got it working
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable filter with RegexFilter