Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java GUI > custom cell ren...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 9689 of 9821
Post > Topic >>

custom cell renderer stays in edit mode

by Jake <jake@[EMAIL PROTECTED] > May 6, 2008 at 02:04 AM

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 
(do***ent 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.
 




 1 Posts in Topic:
custom cell renderer stays in edit mode
Jake <jake@[EMAIL PROT  2008-05-06 02:04:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 4:43:54 CDT 2008.