Is this your first time here? SwingWiki is a Java Swing Developer community site with an big archive of Swing-related usenet groups and mailing lists, but also tips, tricks and articles and book reviews written by your colleagues from around the world. If you came here through a search engine and did not find what you were looking for, make sure to check the wiki table of contents.

custom cell renderer stays in edit mode

From:Jake [jake@masked-domain]
Sent on:6 May 2008 02:04:47 GMT
Hi,

In a JTree I have several leaf nodes w/ a custom renderer extended from
an AbstractCellRenderer which implements a TreeCellEditor and a
CellEditorListener. Some of the leaf nodes are JComboBoxes, and others
are JTextFields.

When the user clicks on one of the JComboBox leaf nodes, the JComboBox
will drop down displaying it's list of menu items ready for selection.

My problem is that, when the user selects an item in the drop down list,
the JComboBox drop down list of items no longer appears (which is
normal), however, the JComboBox is still in edit mode as seen by the item
that is still highlighted and the icon is still showing an edit icon
(document icon) and not the icon I have on it when in a normal unediting
state.

It seems that while it's still in an editing state, the only way to
"punch in" the value is when the user clicks on another leaf node or
loses focus, then the leaf node apears as normal. I'm expecting that once
the selection is made from the list by clicking on an item, then it's no
longer being edited.

Anyone have ideas on this? Any help much appreciated.
Found what you were looking for? If not - continue at Wiki Index

 
Recent changes | RSS changes | Table of contents | News Archive | Terms And Conditions | Register | The Quest For Software++| Ruby Resources
FitNesse Resources