From: Mark R. <blo...@ho...> - 2001-09-25 15:39:39
|
Hey guys, can anyone advise a stratagy for the following situation: I have a dialog window which contains a number of fields. Each field is initialised with a valid default value, and is associated with a focusListener. If, a user modifies a field, a validation method is called when focusLost is detected for that field(textbox or what not). So far so good, everything works. However, I would like for the user to be able to cancel, regardless of whether or not any fields contain an invalid value. With this in mind I associated a mouseListener to my cancel button, but The problem is that focuslost() seems to be given priority over everything else. Focuslost is detected before mouse clicked over button which I find surprising (how did it know it was losing focus before the button had registered a click). I figure this must be a fairly common situation and there is probably some well defined (and probably obvious) way to deal with it. So, if anyone can lend me some fatherly/motherly advice I'd really appreciate it. cheers blobby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |