AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Strange behaviour when showing dialog in focusLost handler

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
TiTi
Guest





PostPosted: Fri Sep 26, 2003 11:23 am    Post subject: Strange behaviour when showing dialog in focusLost handler Reply with quote



Hi,

I wrote a FocusListener for a component that does input validation (in
focusLost method). If the input is invalid, the listener shows a dialog
(JOptionPane.showDialog()) and returns the focus to that component
(JComponent.requestFocus()).

Now a description of the problem. Suppose the component has an invalid
entry, and a user clicks to a button. This causes a focusLost event, which
validates the input. The input is incorrect, a dialog is shown and the focus
is returned. However, if I move my mouse cursor over the button I pressed,
it lights up with a color as if it were being pressed.

How can I prevent such behaviour?

Thanks,
Tom.
(PS: The same behaviour occurs when the input validation is done using an
InputVerifier).


Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.