JDK-4118679 : Only Metal: Tooltip on JComboBox is not working
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1998-03-11
  • Updated: 1998-03-11
  • Resolved: 1998-03-11
Related Reports
Duplicate :  
Description
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.

Comments
PUBLIC COMMENTS duplication
10-06-2004