>>>>> "fastegal" == fastegal <Kleopatra> writes:
fastegal> "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. >> fastegal> Hm, I could not reproduce your problem, implementing a very rudimentary fastegal> CellEditor with JSpinner. On a first test it it always relays the edited fastegal> value to the table if commitEdit in called in stopCellEditing. Before fastegal> going on I would like to know why that's not working in your case, so fastegal> why do you need the focusListener at all? Do you have a little testcase fastegal> demonstrating the problem? I'll see if I can set that up. Just to make sure we're talking about the same thing, you are testing direct entry of a number into the field, correct? -- =================================================================== David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] _______________________________________________ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing