On Wed, 10 Jul 2024 10:28:08 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> When a JTable is resized with` JTable.setAutoResizeMode` set to ` 
> AUTO_RESIZE_LAST_COLUMN` then it behaves exactly as if I specified 
> `AUTO_RESIZE_ALL_COLUMNS`. 
> This is because when `JTable.doLayout` tries to resize the columns, it checks 
> which column to resize by calling `getResizingColumn `and in absence of any 
> column info, it resizes all, so during `setAutoResizeMode` the resizing 
> column needs to be set, which is being done for AUTO_RESIZE_LAST_COLUMN in 
> this fix.
> No regression test is provided as it can be easily checked with 
> SwingSet2->JTable(demo)->Autoresize mode (set to "Last Column")

Isn't LAST_COLUMN is meant to be different than specifying a particular column ?
Suppose the app specified the resizing column and expects it to be unchanged 
after changing mode back to a previous mode ?
If the app changes the mode would it really expect now a particular column to 
be specified ? 
Is a specific test going to be hard ?
No one actually routinely manually tests this in SwingSet, and we don't do 
integration testing any more.

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

PR Review: https://git.openjdk.org/jdk/pull/20107#pullrequestreview-2169908328

Reply via email to