-
-
Save HenryLoenwind/3d4601c0aa201a3a4f506fac64c8c5b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int growingColumn = -1; | |
public void setGrowingColumn(int growingColumn) { | |
this.growingColumn = growingColumn; | |
} | |
public void adjustColumns() { | |
TableColumnModel tcm = table.getColumnModel(); | |
for (int i = 0; i < tcm.getColumnCount(); i++) { | |
if (i != growingColumn) { | |
table.getColumnModel().getColumn(i).setMaxWidth(99999); | |
table.getColumnModel().getColumn(i).setPreferredWidth(900); | |
adjustColumn(i); | |
} | |
} | |
} | |
private void updateTableColumn(int column, int width) { | |
... | |
// table.getTableHeader().setResizingColumn(tableColumn); | |
// tableColumn.setWidth(width); | |
tableColumn.setMaxWidth(width); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment