There are many rows on above showing jtable. I want to filter record by short code. If I type short code like 1234 it should be display only short code 1234 associated row on jtable.

Thanks

有帮助吗?

解决方案

You're going to have write the code...Start by checking out how to use tables, in particular sorting and filtering

The basic requirement would be to attach an ActionListener to both the field and button (you can do this from the form editor if you wish).

Within the actionPerformed event handler method, you need to create a RowFilter and apply it to the tables RowSorter.

A table can be configured to automatically create a row sorter by setting the autoCreateRowSorter property to true.

It's all explained nicely in the linked tutorials...

And another example

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top