Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8328163

Implement automatic instruction sizing for PassFailJFrame

XMLWordPrintable

      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.

            aivanov Alexey Ivanov
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: