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

JDK1.2, Solaris: JComboBox.setToolTipText() does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.0b, 1.1.5, 1.2.0
    • client-libs
    • None
    • x86, sparc
    • solaris_2.5.1, solaris_2.6, windows_nt

      The following application creates a JComboBox with an associated
      JToolTip.

      If the cursor is placed over the JComboBox, no tooltip is displayed.
      This happens only on Solaris.
      Using JDK1.2.
      ========================================================================

      /*
       * ComboBoxBug.java
       * JDK1.2, Solaris: JComboBox.setToolTipText() does not work
       *
      */

      import java.awt.BorderLayout;
      import java.awt.swing.*;
       
       
      public class ComboBoxBug {
       
          public static void main(String[] arg) {
      JFrame frame = new JFrame();
       
      JComboBox combobox = new JComboBox();
        combobox.setToolTipText("Hi there!");
        System.out.println("combobox.getToolTipText(): " + combobox.getToolTipText());
        combobox.addItem("Item 1");
        combobox.addItem("Item 2");
        combobox.addItem("Item 3");
       
       
        JPanel panel = new JPanel(new BorderLayout());
        panel.add(new JLabel("This combobox has an associated tooltip"), BorderLayout.NORTH);
        panel.add(combobox, BorderLayout.CENTER);
       
        frame.getContentPane().add(panel);
        frame.pack();
      frame.setSize(300,65);
        frame.setVisible(true);
           }
       }
       
      ==============================================================
      This also happens on win32, again only with the metal look and feel. still hapenning with 1.0.2


      daniel.indrigo@Canada 1998-05-12

            tsantossunw Tom Santos (Inactive)
            gaurisha Gauri Sharma (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: