Another Focus Issue with JTable
- From: "Elim Garak" <Garak@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 18:15:31 GMT
Dear Group , i have the following problem:
In a JTable i use a column with JCombobox as Celleditors. For convenience
reasons i want to have the same following behavoiur with comboboxes as it is
with the DefaultCelleditor:
If a Cell has a focus and you press one key, the cell "switches" to Editor
and the key pressed is visible in the field and the curosr is visible (so
the editor has focus)
But in the JCombobox colum the behavoiur is that if i press a button, the
editor gets visible but it does not seem to have the focus. Editing is not
yet possible. Editing gets possible only if i press ctrl+tab or click one
time with mouse on cell.
I have extended the class DefaultTableCellEditor and tried to grab the focus
within the
GetTableCellEditorComponent
method by using
this.editorComponent.requestFocusInWindow();
this.editorComponent.getEditor().getEditorComponent().requestFocusInWindow()
but it dint work. Both methods returned false telling me that they cannot
gain standard focus at all.
What am i doing wrong, how can i achieve same behaviour?
Thanks for any help on this topic,
Cheers,
ElimGarak
.
- Prev by Date: Re: Splash Screen Woes or Why doesn't setVisible(true) protect from setVisible(false)
- Next by Date: Re: Focus Issue with regards to JTable
- Previous by thread: I translate the 2D graphics object, but it prints new and old graphics on each page
- Next by thread: How to remember the size of a dialog
- Index(es):