JDK-8340308 : PassFailJFrame: Make rows default to number of lines in instructions
  • Type: Enhancement
  • Component: client-libs
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-09-17
  • Updated: 2024-10-25
  • Resolved: 2024-09-19
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.
JDK 11 JDK 17 JDK 21 JDK 23 JDK 24 JDK 8
11.0.26-oracleFixed 17.0.14-oracleFixed 21.0.6-oracleFixed 23.0.2Fixed 24 b17Fixed 8u441Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
It has become quite common to use the following code

.rows((int) INSTRUCTIONS.lines().count() + 1)

to set the number of rows for PassFailJFrame.

This can be made the default.

Examples of the files where the above is used:
test/jdk/java/awt/print/PageFormat/Orient.java
test/jdk/java/awt/print/PageFormat/SetOrient.java
test/jdk/java/awt/print/PrinterJob/Cancel/PrinterJobCancel.java
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk17u-dev/pull/2996 Date: 2024-10-23 14:55:00 +0000
23-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/1084 Date: 2024-10-23 14:54:37 +0000
23-10-2024

Fix request [17u,21u] I backport this for parity with 17.0.14-oracle,21.0.6-oracle. No risk, only a test change. Clean backport. Executed a test using PassFailJFrame to check.
23-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk23u/pull/113 Date: 2024-09-20 11:11:49 +0000
20-09-2024

Fix Request for 23u This fix changes the default for the number of rows in PassFailJFrame, manual test framework, which makes creating more convenient. Risk: Low Pull request for jdk23u: https://github.com/openjdk/jdk23u/pull/113
20-09-2024

Changeset: d1d82400 Branch: master Author: Alexey Ivanov <aivanov@openjdk.org> Date: 2024-09-19 16:59:51 +0000 URL: https://git.openjdk.org/jdk/commit/d1d824008d1dc70029013820814fd03c40b4e309
19-09-2024

You can find all such tests with the following commands: + 1: grep --recursive --files-with-matches --perl-regexp '\.rows\(\(int\).*\.lines\(\)\.count\(\).*\+.*1.*\)' test/jdk + 2: grep --recursive --files-with-matches --perl-regexp '\.rows\(\(int\).*\.lines\(\)\.count\(\).*\+.*2.*\)' test/jdk At the moment, there are 29 and 24 tests correspondingly in the above groups.
17-09-2024

This is part of a larger effort for providing better defaults for sizing the instructions which is tracked by JDK-8328163: Implement automatic instruction sizing for PassFailJFrame.
17-09-2024

Two tests added by JDK-8339842 use `+ 5`: test/jdk/java/awt/Focus/LightweightFocusLostTest.java test/jdk/java/awt/Focus/MixedWeightFocus.java
17-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21039 Date: 2024-09-17 13:45:06 +0000
17-09-2024