"David M. Karr" schrieb:
> 
> I've done some more experimentation on this.  I was able to go further on the
> idea of using a FocusListener because Kleopatra pointed out to me the new
> "setSurrendersFocusOnKeystroke()" method on "JTable".  Using this, I could
> ensure that the spinner actually gets focus and later loses it (actually, it's
> the internal text field, not the spinner).  Unfortunately, what I found was
> that just before the FocusListener is processed, the field has already been
> reverted to its old value.
> 
> So, I found that the only practical solution is to set the internal text field
> to uneditable.  In other words, to not allow manual editing of the text field.
> 

Hm, I could not reproduce your problem, implementing a very rudimentary
CellEditor with JSpinner. On a first test it it always relays the edited
value to the table if commitEdit in called in stopCellEditing. Before
going on I would like to know why that's not working in your case, so
why do you need the focusListener at all? Do you have a little testcase
demonstrating the problem?

Greetings
Jeanette
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to