Skip to content

Java 25#77

Merged
Rylern merged 6 commits intomainfrom
java-25
Oct 27, 2025
Merged

Java 25#77
Rylern merged 6 commits intomainfrom
java-25

Conversation

@Rylern
Copy link
Contributor

@Rylern Rylern commented Oct 24, 2025

#76 may be related a JavaFX bug. It happens when:

  • The table has a constrained column resize policy.
  • The table is resized by more than 32 pixels.
  • At least one column of the table has a max width set to Double.Infinity.

At some point in the TableView code when a column is resized (com.sun.javafx.scene.control.ResizeHelper.distributeLargeDelta() function), the new width of the column is computed from the column max width. When the column max width is Double.Infinity, the new column width is 0, which creates what is seen in #76.

This PR just sets the max width of all columns to something big (2000) but not Double.Infinity. This should solve the issue.

@Rylern Rylern requested a review from petebankhead October 24, 2025 16:41
@Rylern Rylern linked an issue Oct 24, 2025 that may be closed by this pull request
Copy link
Member

@petebankhead petebankhead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that fixes the behavior in #76 for me.

I'm not sure if we should generally be updating the dependencies here, at least not if we intend for this to be reusable in projects that might require older versions (e.g. for compatibility with Java 17).

But since I don't think others are using it at this point, I don't really mind. An advantage of JavaFX 25 is that it could potentially make it possible to remove the dependency on RichTextFX in the future (depending upon how the built-in alternative behaves).

Either way, it would be good to make a release of this soon so that we can integrate it into QuPath and check it's behaving nicely.

@Rylern Rylern merged commit d9ab3c6 into main Oct 27, 2025
3 checks passed
@Rylern Rylern deleted the java-25 branch October 27, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table misbehaving on resize with JavaFX 25 (sometimes)

2 participants