Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to close jInternal Frame as soon as focus moves to any object in the parent JFrame.

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to close jInternal Frame as soon as focus moves to any object in the parent JFrame.

    I have a form (JFrame). 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.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: How to close jInternal Frame as soon as focus moves to any object in the parent JFrame.

    Can't you use a FocusListener?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Why can't I close my JFrame ?
    By bartolio in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 20th, 2013, 11:23 AM
  2. How to close a frame on a button click ??
    By rk0887 in forum AWT / Java Swing
    Replies: 1
    Last Post: August 22nd, 2012, 08:58 AM
  3. [SOLVED] Set Invisible or close a frame
    By Souperk in forum Java Theory & Questions
    Replies: 9
    Last Post: November 30th, 2011, 11:56 AM
  4. Opening a new frame on close.
    By Zein in forum Java Theory & Questions
    Replies: 1
    Last Post: August 24th, 2011, 03:25 PM
  5. Maintain focus on JFrame
    By nik_meback in forum AWT / Java Swing
    Replies: 1
    Last Post: December 15th, 2010, 08:49 AM