How can i make a TableRowShorter between two Date

后端 未结 1 728
我在风中等你
我在风中等你 2021-01-26 07:16
combobox.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent arg0) {
                if(arg0.getStateChange()==ItemEvent.SELECTED) {
         


        
1条回答
  •  一整个雨季
    2021-01-26 07:41

    For example if I sent the String ("01/01/2020"), I only want to see the rows with ("01/01/2020") and after this date.

    You need to use a "date filter".

    For example this filter will return all the date after a specific date:

    RowFilter.dateFilter(ComparisonType.AFTER, new Date());
    

    Read the RowFilter API for other filters you can use.

    Note:

    You should NOT be storing String values in the model. You should store the date in an object that represents a date and then use a custom renderer to format the date. This will allow the filter from above to work properly.

    0 讨论(0)
提交回复
热议问题