I have an editable JComboBox. I want it to scroll to the default value
if the user double-clicks in the edit area. So, I tried using
'addMouseListener()' with a MouseAdapter to listen for the click
count. I'm hearing nothing, though. Can a JComboBox not respond to a
mouse listener? What am I doing wrong?
TIA,
John
> I have an editable JComboBox. I want it to scroll to the default value
> if the user double-clicks in the edit area. So, I tried using
> 'addMouseListener()' with a MouseAdapter to listen for the click
> count. I'm hearing nothing, though. Can a JComboBox not respond to a
> mouse listener? What am I doing wrong?
you click not on JComboBox, but in editorComponent (JTextField) of
ComboBoxEditor. see ComboBoxEditor.getEditorComponent();
--
____________
http://reader.imagero.com the best java image reader.
John Moore - 28 Nov 2003 17:30 GMT
>you click not on JComboBox, but in editorComponent (JTextField) of
>ComboBoxEditor. see ComboBoxEditor.getEditorComponent();
You do indeed! How stupid of me to forget that. It now works like a
dream! Thanks!
John