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

Heavyweight ToolTips don't work (JDK 1.3/WinNT)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • client-libs



      Name: skT45625 Date: 05/19/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      Compile and run the program shown below. When positioning the mouse over the
      "Exit" button, the tooltip either does not appear at all, or if it does, it just
      flickers on and off, and no text is ever displayed.
      If the setLightWeightPopupEnabled(false) line is removed, this program behaves
      OK if the tooltip fits, but you get the flickering thing if it does not.

      Platform: Windows NT 4.0 sp5, JDK 1.3.

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

      public class ToolTipTest {

          public static void main(String[] args) {
      ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
      new ToolTipTest(args);
          }

          private ToolTipTest(String[] args) {
      JFrame f = new JFrame("ToolTipTest");
      f.getContentPane().setLayout(new GridLayout(1, 1));
      JButton b = new JButton("Exit");
      b.setToolTipText("This is a long ToolTip.");
      b.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
      System.exit(0);
      }
      });
      f.getContentPane().add(b);
      f.pack();
      f.setVisible(true);
          }
      }
      (Review ID: 105127)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: