> I have a 4 column JTable, and in the last 3 columns I
> want the input to be limited to the keys "0" to "9"
[quoted text clipped - 9 lines]
> --
> Dag.
You will need to subclass the editor for those fields.
Possible to do in Editor class or make the give the
underlying textfield a custom document.
The following text comes from now out of date swing tutorial.
I cant see it in the latest versino from sun but this might
help a bit.
------------
The data in a change-validated field is checked each time the field
changes. A field that is change-validated can never contain invalid data
because every change (keystroke, cut, copy, and so on) that might cause
the data to be invalid is rejected. To create a change-validated text
field you need to provide a custom document for your text field. If you
aren't familiar with documents yet, see Concepts: About Documents.
Warning: Do not use a document listener for change validation. By
the time a document listener has been notified of a change, it's too
late, the change has already taken place. See the last couple of
paragraphs in Listening for Changes on a Document for more information.
------------
> I have a 4 column JTable, and in the last 3 columns I
> want the input to be limited to the keys "0" to "9"
[quoted text clipped - 4 lines]
>
> anyone?
Buid a custom editor with the desired behaiour and set it as the
CellEditor for those columns.
BK