File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
Swing / AWT / SWT
How to close jInternal Frame as soon as focus moves to any object in the parent JFrame.
Joined: Jun 20, 2013
Jun 20, 2013 11:51:56
I have a form (
). When I click a button in this frame a new sub form (jInternalFrame) opens.
I need help in understanding how to close the jInternalFrame as soon as it or any of the components from it looses focus.
Joined: Sep 13, 2007
Jun 20, 2013 12:35:27
Welcome to the Ranch.
Your answer lies in the
section of the Swing tutorial. Which event listener is the appropriate one depends on how you define "focus": keyboard, mouse, jinternalframe or something else.
Joined: Jun 19, 2010
Jun 20, 2013 14:33:41
The quieter you are, the more you are able to hear.
It is sorta covered in the
JavaRanch Style Guide
subject: How to close jInternal Frame as soon as focus moves to any object in the parent JFrame.
Creating modal in JInternalFrame
How to set focus on one of the two JInternalFrame
Putting a JTabbedPane in a JInternalFrame
mnemonics are not getting focus for the menubar
JInternalFrame to get Focus
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014