Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #269
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Listening to Mouse le |
| Message-ID | <1164887847.674036.221490@n67g2000cwd.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1164883540.536184.161880@j72g2000cwa.googlegroups.com> |
| Date | 2011-04-27 15:26 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui James Appleby wrote: .... > JFrame that sits on top of the desktop and has various input fields in > it. The requirement is that when the user leaves the frame to use > other applications the data is submitted for processing. > > I have tried to implement this using a MouseListener. (I know it would > miss Alt-Tab or other none mouse navigation but I felt it worked for my > user group.) You have odd users (..but I bet they will still surprise you!). >...The problem is that adding a listener on the main frame > fired off an event for it and every component added to it. So if I > move the mouse across the frame, into and out of a text field without > clicking, I get two events, one when it exits the frame into the text > field and another exiting the text field back to the frame. I still do not see 'the problem', ... <snip> > I have been stuck on this for quite a while and searched extensively > for a solution. Can anyone help me, please? ...if you do not wish to act on those events inside the frame - don't. "ignore them and they'll go away".. E.G. You might check the bounds of the frame and ascertain if the point at which the mouse event occured was *inside* it (before acting on it). Andrew T. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar
Listening to Mouse leavin "James Appleby" <james.appleby@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Listening to Mouse le "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Listening to Mouse le "Thomas Kellerer" <thomas.kellerer@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Listening to Mouse le "James Appleby" <james.appleby@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Listening to Mouse le "Oliver Wong" <oliver.wong@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Listening to Mouse le "James Appleby" <james.appleby@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
csiph-web