Error when removing columns from table model

Issue #38 resolved
Former user created an issue
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

Comments (4)

  1. coderazzi coderazzi repo owner
    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

  2. coderazzi coderazzi repo owner
    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

  3. coderazzi coderazzi repo owner
    Solved on 5.1.2
    

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

  4. Log in to comment