On Mon, 19 Jan 2026 02:18:06 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> AUTO_RESIZE_LAST_COLUMN handling was done in 
> [JDK-8234071](https://bugs.openjdk.org/browse/JDK-8234071) but it didn't 
> honour the preferred width if it is already been set for each column so when 
> layouting is done, it only sees the `resizingColumn` 
> is set to AUTO_RESIZE_LAST_COLUMN and adjust only the last column and 
> distribute width equally to all other column.
> 
> Fix is made to honour the user-set preferred column width even if auto-resize 
> mode is set to LAST_COLUMN

src/java.desktop/share/classes/javax/swing/JTable.java line 3204:

> 3202:         // AUTO_RESIZE_LAST_COLUMN autoResizeMode
> 3203:         for (int i = 0; i < columnModel.getColumnCount(); i++) {
> 3204:             if (columnModel.getColumn(i).getPreferredWidth() != 75

Why are we using hardcoded value here ? Any particular reason for checking 
width against value `75` ?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29291#discussion_r2711000558

Reply via email to