public class SwingTableRowHeightUpdater extends Object
A helper class for setting the correct row heights for a Swing table.
Swing does not automatically adapt the height of a table's rows to the size of the contained components. This is problematic especially if a custom cell renderer is used. This class implements this functionality. It can be called with a table as argument and then updates the heights of all rows so that the column with the greatest height fits in.
| Constructor and Description |
|---|
SwingTableRowHeightUpdater() |
| Modifier and Type | Method and Description |
|---|---|
void |
updateRowHeights(JTable table)
Updates the heights of all rows in the specified table.
|
void |
updateRowHeights(JTable table,
int startRow,
int endRow)
Updates the heights of all rows of the specified table in the given
range.
|
public void updateRowHeights(JTable table)
table - the tablepublic void updateRowHeights(JTable table, int startRow, int endRow)
table - the tablestartRow - the index of the first rowendRow - the index of the last row (including)Copyright © 2016 The JGUIraffe Team. All rights reserved.