Hi,
I have a JTable which validates the data entered into it.The user
can navigate from one cell to another using the KeyBoard or using
mouse.
Once the user leaves a field say by hitting the Enter key the data
needs to be validated and the cursor is set back to the same cell in
case the data is invalid.As far as navigation through KeyBoard is
concerned i'm able to do it.
But in case the user moves from once cell to another using the mouse
i'm not sure how to handle it.I have my custom cell editor where i try
to get the cell from where the focus was lost but i am unable to do
it.
I am not sure whether i'm on the right track or i need to do something
different to achieve this.Any help is welcome.
Regards
Ananya
ak - 18 Nov 2003 07:25 GMT
use InputVerifier
> Hi,
> I have a JTable which validates the data entered into it.The user
[quoted text clipped - 12 lines]
> Regards
> Ananya
Ananya - 18 Nov 2003 22:26 GMT
> use InputVerifier
>
[quoted text clipped - 14 lines]
> > Regards
> > Ananya
Thanks for the input but the inputverifier doesnt seem to work.I am
not sure why?I added and inputverifier to each cell editor component
inspite of verify() method reurning false it relinquishes the focus to
the other cell.
Any suggestion or help regarding how to handle lost focus is welcome.