coderazzi / tablefilter-swing

TableFilter is a set of Swing components to support user-driven filtering on table.
https://coderazzi.net/tablefilter
MIT License
7 stars 2 forks source link

Error when removing columns from table model #38

Closed coderazzi closed 9 years ago

coderazzi commented 9 years ago

Original report by Anonymous.


What steps will reproduce the problem?
1. Use BaseExample
2. At the end of the constructor, add
        TestTableModel.setModelWidth(5);
        table.setModel(TestTableModel.createTestTableModel(1000));
3. Run the example

What is the expected output? What do you see instead?
I would expect the table to get reduced to 5 columns. Instead an error is thrown.

What version of the product are you using? On what operating system?
5.1.1, Windows 7, 32bit, Java 1.6.0_17-b04

Please provide any additional information below.
This issue occurs e.g. when a column gets removed from the table model while either
adaptive choices or auto choices are enabled. If both are disabled, the table update
works fine.

Original issue reported on code.google.com by dirk.engel@rwth-aachen.de on 2015-03-05 19:56:43

coderazzi commented 9 years ago

Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).


Hi, Dirk,

Indeed, the current code handles properly changes on the existing model, but changing
completely the model instance produces the error that you observe.

As a workaround while the bug is crushed, I would suggest detaching the header from
the table before doing the change (in fact, performance-wise it will be in any case
the best choice).

Cheers,

 Lu/

Original issue reported on code.google.com by coderazzi on 2015-03-10 00:54:48

coderazzi commented 9 years ago

Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).


Note that the error only happens if the table model change happens before showing the
table.

Original issue reported on code.google.com by coderazzi on 2015-03-17 23:04:43

coderazzi commented 9 years ago

Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).


Solved on 5.1.2

Original issue reported on code.google.com by coderazzi on 2015-03-18 22:26:40