Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2003

Tip: Looking for answers? Try searching our database.

Detecting focusLost Event in a JTable Cell.

Thread view: 
Ananya - 17 Nov 2003 21:01 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.