File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Make it so: Java DB Connections & Transactions this week in the JDBC 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
It's not a secret anymore!