Re: Editable JComboBox in JTable



Hi Robert.

I'm not sure this is what you are looking for,
but hopefully it is.

private void jComboBox1KeyReleased(java.awt.event.KeyEvent evt) {
jComboBox1.setSelectedItem(String.valueOf(evt.getKeyChar()));
}

WarmRegards
Darko Topolsek

"Robert" <robert.kovacevic@xxxxxxxx> wrote in message
news:djb4v5$h05$1@xxxxxxxxxxxxxxxxx
> When I select a normal cell with a default editor for strings and press a
> letter key, the letter is automaticaly typed in the cell, but when I
> select a cell with an editable JComboBox editor and press a letter key it
> only "opens" the JComboBox editor. I then have to press the key again to
> type it in the combobox.
> How can I fix this, why is the first keypress "lost"?
> (btw, surrenderFocusOnKeystroke is set to true)


.