We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a42fdb commit 9b6ac60Copy full SHA for 9b6ac60
src/java.desktop/share/classes/javax/swing/JTable.java
@@ -3195,6 +3195,11 @@ private int viewIndexForColumn(TableColumn aColumn) {
3195
public void doLayout() {
3196
boolean prefWidthSet = false;
3197
TableColumn resizingColumn = getResizingColumn();
3198
+ // doLayout is called for both pack and show
3199
+ // so if initial preferred width is set by user then
3200
+ // it needs to be honoured even if resizingColumn
3201
+ // is set to last column on account of
3202
+ // AUTO_RESIZE_LAST_COLUMN autoResizeMode
3203
for (int i = 0; i < columnModel.getColumnCount(); i++) {
3204
if (columnModel.getColumn(i).getPreferredWidth() != 75
3205
&& columnModel.getColumn(i).getWidth() == 75) {
0 commit comments