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

Tooltip blinking

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • client-libs
    • beta
    • x86
    • windows_nt



      Name: apC97674 Date: 11/26/99


          Compile the following code. Run it. Move mouse cursor and rest it over
      the bottom of the internal frame's button. Instead the tooltip appearing we
      can see tooltip's window blinking.

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

      public class ToolTipBug extends JInternalFrame {
      JButton testButtonOne = new JButton("Test");
      JDesktopPane desktop = new JDesktopPane();
      JInternalFrame testFrameOne = new JInternalFrame("Test Frame One", true);
      public ToolTipBug() {
      desktop.setBackground(Color.gray);
      testButtonOne.setToolTipText("Test Button Tool Tip Which Gets Cut Off");
      testFrameOne.setSize(100, 100);
      testFrameOne.getContentPane().add(testButtonOne);
      testFrameOne.setLocation(1, 1);
      desktop.add(testFrameOne);
      testFrameOne.setVisible(true);
      setContentPane(desktop);
      }
      public static void main(String args[]) {
         WindowListener testFrameListener = new WindowAdapter() {
           public void windowClosing(WindowEvent e) {
      System.exit(0);
           }
          };
      JFrame testFrame = new JFrame();
         testFrame.addWindowListener(testFrameListener);
      ToolTipBug testClass = new ToolTipBug();
          testFrame.setContentPane(testClass.desktop);
          testFrame.pack();
      testFrame.setSize(new Dimension(300,200));
      testFrame.show();
      }
      }

      ----------------------------------------------------------------------------------

      ======================================================================

            amfowler Anne Fowler (Inactive)
            apikalev Andrey Pikalev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: