Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2649

Output tab name truncated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 8.2, 11.0
    • None
    • None
    • Windows 10, JDK 11

    Description

      When running NetBeans with JDK 11 (specifically AdoptOpenJDK 11.0.3+7) on Windows 10, the Output tab name is truncated and appears as "Outp..." rather than "Output".

      The problem appears to be related to text antialiasing not being used in the offscreen graphics while it is used when actually rendering the tab contents. The widths of some characters, notably the wider capital letters such as "O", differ when "LCD HRGB antialiasing" (and perhaps others) is used.

      Adding the following to BasicScrollingTabDisplayerUI.getOffscreenGraphics() appears to resolve the issue:

      public static Graphics2D getOffscreenGraphics() {
          ...
          Graphics2D graphics = (Graphics2D) result.getGraphics();
          graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
          UIManager.getDefaults().get(RenderingHints.KEY_TEXT_ANTIALIASING));
          return graphics;
      }

      Attachments

        1. Truncated Output Tab.png
          6 kB
          Rangi Keen

        Activity

          People

            Unassigned Unassigned
            rkeen Rangi Keen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: