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

Only Metal: Tooltip on JComboBox is not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.2.0
    • client-libs

      Only Metal Look:
      In solaris and windowsNT, I set tooltip on JComboBox. It doesn't work. It is true on both JDK1.2Beta3L and Swing-1.0.1 builds.
      To reproduce run the following test case.

      // for JDK1.1.x
      //import com.sun.java.swing.*;
      //import com.sun.java.swing.border.*;

      // for JDK1.2
      import java.awt.swing.*;
      import java.awt.swing.border.*;


      import java.awt.*;
      import java.awt.event.*;
      import java.util.*;

      public class ComboTest extends JFrame
      {
          public ComboTest(){
              super("ComboBox Test");
              final JTextArea label = new JTextArea(4,20);
              JComboBox parentBox = new JComboBox();
              parentBox.addItem("entry a");

              /*
              MouseListener ml = new MouseAdapter(){
                  public void mouseEntered(MouseEvent e){
                      label.setText("mouse entered");
                  }

                  public void mouseExited(MouseEvent e){
                      label.setText("mouse exited");
                  }
              };

      */


              parentBox.setToolTipText("parent component");
              //parentBox.addMouseListener(ml);

              label.setText("Move mouse to enter the combo box! \nYou have to see a tool tip.");
              getContentPane().add("Center", new JScrollPane(label));
              getContentPane().add("North", parentBox);

              setBounds(100,100, 400,300);
              show();
          }

          public static void main(String[] args){
              new ComboTest();
          }
      }

      // The end of the class.

            Unassigned Unassigned
            bkimsunw Bae-chul Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: