JDK-8299753 : Tree/TableView: Column Resizing With Fractional Scale
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: jfx20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2023-01-06
  • Updated: 2025-03-21
  • Resolved: 2025-03-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx25 b07Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
In the presence of snapping and fractional scale, the implemented algorithm could never work correctly. The reason is that the distance between snapped positions is not the same. As a result, changing a single column width requires shifting of the subsequent or all the columns, which in turn might require a change in their widths, and so on.

This makes me think that a different algorithm might be needed, a simulated annealing perhaps.

The issue can be reproduced on Windows by setting fractional scale:

Windows 11:
Settings -> System -> Display -> Scale -> 125% (or 225% ...)

In the attached video clip, when resizing a column under AUTO_RESIZE_FLEX_NEXT_COLUMN policy, only subsequent columns should get resized.  Instead, we see that columns to the left of the one being resized are affected.  This does not happen with integer scales or on Mac.
Comments
Changeset: 1824db5c Branch: master Author: Andy Goryachev <angorya@openjdk.org> Date: 2025-03-04 15:33:29 +0000 URL: https://git.openjdk.org/jfx/commit/1824db5c7183b5b3749fe4c29baae51f34dcc421
04-03-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1156 Date: 2023-06-15 19:38:00 +0000
09-07-2024

Changing to a P4 bug after a conversation with [~kcr].
13-07-2023

Once done, please revert changes made in JDK-8306571 and make sure JDK-8305709 passes.
20-04-2023