summaryrefslogtreecommitdiff
path: root/javax/swing/DefaultCellEditor.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/DefaultCellEditor.java')
-rw-r--r--javax/swing/DefaultCellEditor.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/javax/swing/DefaultCellEditor.java b/javax/swing/DefaultCellEditor.java
index 9c951d395..16ed1ec68 100644
--- a/javax/swing/DefaultCellEditor.java
+++ b/javax/swing/DefaultCellEditor.java
@@ -313,7 +313,24 @@ public class DefaultCellEditor
{
JComboBox c = (JComboBox) editorComponent;
return value = c.getSelectedItem();
- }
+ }
+
+ /**
+ * Returns true to indicate that the editing cell can be selected. If the
+ * check box is not editable, expands it. If it is editable, brings
+ * focus to the editor field.
+ *
+ * @param event unused in default method
+ *
+ * @return true always
+ */
+ public boolean shouldSelectCell(EventObject event)
+ {
+ JComboBox c = (JComboBox) editorComponent;
+ if (!c.isEditable)
+ c.showPopup();
+ return true;
+ }
}
/**