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

tooltip does not render correctly in JMenuItem if heavyweight

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic
    • OS:
      generic

      Description

      Attached is a source file that illustrates the following bugs in JDK1.2.2 Reference on Solaris and JDK1.2.2 Production on NT40SP3.

      The examples creates a JFrame with a JMenuBar with one JMenu with one JMenuItem. The menu item has a tooltip and an accelerator. The menu is forced to be mediumweight, and so is the tooltip.

      Both platforms:
      When the menu item is highlighted, the tooltip is supposed to appear. The size of the window has a profound effect on the tooltip. If the window is very large (menu does not cross outside the window), then the tooltip will be rendered outside of the menu. The heavy window under the popup clips the tooltip completely.

      If the window is narrow such that the popup falls outside of the window, then the tooltip is forced inside the popup as much as possible. It is still clipped by the heavy window under the popup.

      If lightweight is enabled for the menu, it is clipped by the heavy button (Java3D canvas in my case). If lightweight is enabled for the tooltip, is also gets clipped by the heavy button.

      I would like the tooltip to be rendered in its own heavy window if it cannot be rendered completely within the lightweight container underneath it. Optionally, setLightWeightEnabled(false) should always force the tooltip to draw heavy.


      On Solaris only:
      The accelerator text is rendered in the tooltip. This does not occur on NT. I would prefer if the accelerator did not appear in the tool tip. Also, for what it's worth, the text of the accelerator in the tool tip does not match the text in the menu item ("Ctrl O" in the menu item, "cntl O" in the tooltip).

        Attachments

          Activity

            People

            Assignee:
            gsaab Georges Saab
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: