Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filter problems  RSS feed

 
Bob Taboy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's my first time trying JTables and I have lots of questions. I want to have a colum with years and show just the range I desire, the problem is that colum is the fourth one and I don't know how to search in that place. The code I have right now is the next one:



can anybody help me?
 
Bob Taboy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
=0 thanks I didn't notice that, btw I already find the answer, how can I end up this post?
 
Paul Clapham
Sheriff
Posts: 22375
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How? Well, it would be really nice if you posted the answer here. Then somebody else might be able to use it later.
 
m Korbel
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- see that you use modified code from API documentation, but :-) you ignored include, to creates a virtual range

- note there are AND, OR, NOT that could/wouldn't be used without, ranking with DATE or NUMBER too,

- never ever seen good combinations of AND, OR, NOT with REGEX, DATE or NUMBER together, non free jide, maybe in vaadin???

- too hard to explain without posting an http://sscce.org/, short, runnable, compilable

EDIT

- see my question about, maybe someone

.

 
Bob Taboy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is the method I use to filter the fourth colum containing numbers

 
m Korbel
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is the method I use to filter the fourth colum containing numbers

- please this is answer or comment to ???,
- did you read Oracle tutorial How to use Tables, sentences about sorting and filtering
- RowFilter searching in whole XxxTableModel throught all columns and rows, by default your arent able to search in one column, restrict RowFilter to two or four..., nor you cant to search this way.
- this is easy and possible with RowSorter, but based on ColumnModel not XxxTableModel
- search for code depot by aephyr for more ideas,
 
Bob Taboy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Korbel, if you read the previous comments you will find this is the answer. And why read more articles if I already have the answer to my problem?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!