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

Some of the components skip validation of font change.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 10, 11
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
      None
    • CPU:
      generic
    • OS:
      generic

      Description

      When the font of the component changes it preferred size should be changed as well(if needed). But some components ignores this rule.

      For example JTree.
      To reproduce the bug uncomment the "TODO" block in this case and run it:
      http://cr.openjdk.java.net/~serb/8201552/webrev.03/test/jdk/javax/swing/GraphicsConfigNotifier/StalePreferredSize.java.html

                  // We change the font size to some big value, as a result the
                  // layout and preferredSize of the component should be changed
                  component.setFont(component.getFont().deriveFont(35f));
                  Dimension last = component.getPreferredSize();
      ...........
      ...........
                  // TODO JDK-8206024
      // if (Objects.equals(after, last)) {
      // System.err.println("Component: " + component);
      // System.err.println("After: " + after);
      // System.err.println("Last: " + last);
      // throw new RuntimeException("Wrong PreferredSize");
      // }

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            serb Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: