I want to use a RowFilter.dateFilter on a JTable, but my Table has only Strings formatted like this "yyyy-MM-dd". If it's not possible to filter my JTable through a dateFilter, how can I solve this problem?
thanks
I want to use a RowFilter.dateFilter on a JTable, but my Table has only Strings formatted like this "yyyy-MM-dd". If it's not possible to filter my JTable through a dateFilter, how can I solve this problem?
thanks
Copyright © 2021 Jogjafile Inc.
You should be storing Date objects in your TableModel, not a String representation of the date. Then you can use a renderer to format the date however you want it displayed. See Table Format Renderers for an example renderer.
Now you can use the DateFilter the way it was designed to be used.