I've been experimenting with Searchable with the JTable in my application. The table model in my JTable can change. For example, a user can click a button to retrieve a new dataset that may have a different number of rows/columns. After trying some experiments, I started getting some Exceptions. For example, if I do a search in the table and then change the table model, an exception may occur (out of bounds exception), because the new model may have a different number of columns, or possibly no data at all. The "Searchable" is still looking at the old table model. I fixed this issue in my application code by installing a new Searchable (SearchableUtils.installSearchable) each time the table model is changed. While this has fixed the problem, I'm not sure this is the best way to solve the issue. Is this the best approach or should I be doing something else?
Thanks