-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.2.0
-
x86
-
windows_nt
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.
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.
- duplicates
-
JDK-4113750 JDK1.2, Solaris: JComboBox.setToolTipText() does not work
-
- Closed
-