summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schuster <theBohemian@gmx.net>2004-12-19 22:34:30 +0000
committerRobert Schuster <theBohemian@gmx.net>2004-12-19 22:34:30 +0000
commit80e102433912a7459d16a0b1f2d063277e8a44f7 (patch)
tree15818928cb5ccdc2225a22125a493bd4983e1dce
parent4af873bb1469b954045475c07a436a0b23aa5728 (diff)
downloadclasspath-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.
-rw-r--r--ChangeLog6
-rw-r--r--javax/swing/JComboBox.java10
2 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index cc3e36cc0..9892bfbfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-19 Robert Schuster <thebohemian@gmx.net>
+
+ * javax/swing/JComboBox.java:
+ (JComboBox): Removed selection of the
+ first item in the model.
+
2004-12-19 Michael Koch <konqueror@gmx.de>
* resource/Makfile.am: Don't call make for subdirs.
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;