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