JDK-8328163 : Implement automatic instruction sizing for PassFailJFrame
  • Type: Enhancement
  • Component: client-libs
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-03-14
  • Updated: 2024-09-20
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
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
When configuring PassFailJFrame, one has to explicitly set the number of rows and columns to size JTextArea which displays the instructions. It's not convenient... If instructions are modified, the numbers for rows/columns needs to be modified.

The number of rows could be easily calculated, it's the number of lines in JTextArea.

In most cases JTextArea.getPreferredSize() should be enough to size the component to display all the text without scrollbars.

There could be some additional considerations for automatic sizing though, especially for HTML-based instructions.