It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes mouse clicks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "mouse clicks" Watch "mouse clicks" New topic

mouse clicks

narasimharao konjeti
Ranch Hand

Joined: Apr 26, 2003
Posts: 130
I opened one JFrame, By the moment I click the mouse anywhere else on the desktop or anywhere. I have to close the JFrame. How can I close the JFrame.
waiting for reply.
nr konjeti

"Unwise to sweat petty stuff, wise to pet sweaty stuff."
VIJAY Yadlapati
Ranch Hand

Joined: Aug 04, 2003
Posts: 175
Implement FocusListener for the frame, and in focusLost(), dispose that frame.
I agree. Here's the link:
subject: mouse clicks
jQuery in Action, 3rd edition