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

Tooltip does not repaint background with correct color on disappearing.

    XMLWordPrintable

Details

    • Cause Known
    • x86
    • windows_2000

    Description

      Name: jk109818 Date: 02/13/2002


      FULL PRODUCT VERSION :
      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
      AND
      java version "1.4.0-rc"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
      Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)

      FULL OPERATING SYSTEM VERSION :
      Microsoft Windows 2000 [Version 5.00.2195]

      ADDITIONAL OPERATING SYSTEMS :


      A DESCRIPTION OF THE PROBLEM :
      When the mouse cursor is placed over one of the three
      buttons on the top-right window: minimize, maximize, close
      the tool tip shows up displaying what these buttons do.
      When I move the cursor away causing the tool tip to
      disappear, the underlying area is repainted with the frame
      background color. These does not happen all the time,
      but happens a lot especially if the mouse is over the
      "maximize" button.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Run the program.
      2. Place the mouse cursor over one of the three button on
      the top-right corner of the window (minimize, maximize,
      close: try the middle maximize button) so that a tool tip is
      displayed.
      3. Move the cursor away to cause the tooltip to disappear.
      The area beneath the tooltip is not repainted correctly.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      The area beneath the tooltip should have the background
      color of the outermost component, but it has the background
      color of the underlying JFrame instead.

      This bug can be reproduced often.

      ---------- BEGIN SOURCE ----------
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;

      public class Test extends JFrame {
      private static final int WIDTH = 400;
      private static final int HEIGHT = 300;

      public Test() {
      setSize(WIDTH, HEIGHT);
      setBackground(Color.red);
      addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
      dispose();
      System.exit(0);
      }
      });
      JPanel panel = new JPanel();
      panel.setBackground(Color.yellow);
      getContentPane().add(panel);
      }

      public static void main(String args[]) {
      (new Test()).setVisible(true);
      }
      }

      ---------- END SOURCE ----------

      CUSTOMER WORKAROUND :
      Change the frame background to match the background of the
      components near these buttons.
      This is not possible if the frame needs to have a different
      background color.
      (Review ID: 138493)
      ======================================================================

      Attachments

        Activity

          People

            vbaranovsunw Vyacheslav Baranov (Inactive)
            jkimsunw Jeffrey Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Imported:
              Indexed: