hdijkema / seaglass

Automatically exported from code.google.com/p/seaglass
0 stars 0 forks source link

IndexOutOfBoundsException if JTable has a an area behind the last column visible #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a JFileDialog
2. Switch the file view to show "Details"
3. Resize the last column of the table and make it smaller
4. An exception is thrown because in the UI you try to create an renderer for 
row = -1 and column = -1 that raises an IndexOutOfBoundsException

My fix for this would be not to create a renderer for a non existing column but 
to use the renderer of the last column.

In file com.seaglasslookandfeel.ui.SeaGlassTableUI in line 1020 change the code 
to 

renderer.getTableCellRendererComponent(table, "", false, false, 0, 
table.getColumnCount()-1); 

And guard the whole block with a try catch because you cannot know if the 
renderer will accept "" as a valid value.

Have fun,
- Rossi

Original issue reported on code.google.com by rosstaus...@googlemail.com on 9 Oct 2010 at 5:40

GoogleCodeExporter commented 9 years ago
Hi,
This is already fixed in the integration_rossi branch.

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 15 Feb 2011 at 7:12

GoogleCodeExporter commented 9 years ago
This issue is fixed in sealglass 0.2 that we just have released.
Please give this new version a try.

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 25 Jun 2012 at 8:44