diff options
author | Robert Schuster <theBohemian@gmx.net> | 2004-12-19 22:34:30 +0000 |
---|---|---|
committer | Robert Schuster <theBohemian@gmx.net> | 2004-12-19 22:34:30 +0000 |
commit | 80e102433912a7459d16a0b1f2d063277e8a44f7 (patch) | |
tree | 15818928cb5ccdc2225a22125a493bd4983e1dce /javax/swing/JComboBox.java | |
parent | 4af873bb1469b954045475c07a436a0b23aa5728 (diff) | |
download | classpath-80e102433912a7459d16a0b1f2d063277e8a44f7.tar.gz |
2004-12-19 Robert Schuster <thebohemian@gmx.net>
* javax/swing/JComboBox.java:
(JComboBox): Removed selection of the
first item in the model.
Diffstat (limited to 'javax/swing/JComboBox.java')
-rw-r--r-- | javax/swing/JComboBox.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/javax/swing/JComboBox.java b/javax/swing/JComboBox.java index e2054d3d1..ca9d3f63a 100644 --- a/javax/swing/JComboBox.java +++ b/javax/swing/JComboBox.java @@ -192,8 +192,9 @@ public class JComboBox extends JComponent implements ItemSelectable, private Object prototypeDisplayValue; /** - * Constructs JComboBox object with specified data model for it. The first - * item in the specified data model is selected by default. + * Constructs JComboBox object with specified data model for it. + * <p>Note that the JComboBox will not change the value that + * is preselected by your ComboBoxModel implementation.</p> * * @param model Data model that will be used by this JComboBox to keep track * of its list of items. @@ -206,11 +207,6 @@ public class JComboBox extends JComponent implements ItemSelectable, setModel(model); setActionCommand("comboBoxChanged"); - /* By default set selected item to the first element in the combo box - * or select nothing if there are no elements. - */ - setSelectedIndex(getItemCount() != 0 ? 0 : -1); - lightWeightPopupEnabled = true; isEditable = false; |