-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.4.0, 5.0
-
generic, x86
-
generic, windows_2000
Name: gm110360 Date: 06/16/2004
FULL PRODUCT VERSION :
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
With focus on JCombobox if we enter ctrl F1, it doesn't invoke tooltip on non Editable JCombobox. for editable comboboxes, it works.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
*
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.net.URL;
public class TestCombo{
JPanel selectPanel;
JComboBox phaseChoices = null;
public TestCombo() {
//Create the phase selection and display panels.
selectPanel = new JPanel();
//Create a combo box with lunar phase choices.
String[] phases = { "New", "Waxing Crescent", "First Quarter",
"Waxing Gibbous", "Full", "Waning Gibbous",
"Third Quarter", "Waning Crescent" };
phaseChoices = new JComboBox(phases);
phaseChoices.setToolTipText("phaseChoices");
// phaseChoices.setEditable(true);
phaseChoices.setSelectedIndex(1);
//Add a border around the select panel.
selectPanel.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder("Select Phase"),
BorderFactory.createEmptyBorder(5,5,5,5)));
//Add moon phases combo box to select panel .
selectPanel.add(phaseChoices);
}
/**
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event-dispatching thread.
*/
private static void createAndShowGUI() {
JFrame.setDefaultLookAndFeelDecorated(true);
//Create a new instance of LunarPhases.
TestCombo phases = new TestCombo();
//Create and set up the window.
JFrame lunarPhasesFrame = new JFrame("Lunar Phases");
lunarPhasesFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
lunarPhasesFrame.setContentPane(phases.selectPanel);
//Display the window.
lunarPhasesFrame.pack();
lunarPhasesFrame.setVisible(true);
}
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
}
---------- END SOURCE ----------
(Incident Review ID: 280157)
======================================================================