Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 575055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:53:49+00:00 2026-05-13T13:53:49+00:00

Sorry for really simple question, but I wasnt able to find anything in the

  • 0

Sorry for really simple question, but I wasnt able to find anything in the net, probably because I dont know the right terms to look for.

When you have a desktop application, there are many so called children windows: one for options, one for “about” and so on. How to make them in Java Swing (with NetBeans tools – optional)?

So far I just created another JFrame and on relevant event opened it the same way Main function launches, well, main JFrame. But there’s something wrong with this method: when I close child window via x in the upper right corner, whole program terminates as if I was closing the main window. This is probably because NetBeans auto generated code for x and I can find and change it somewhere… but still I have a feeling that there must be a simpler proper way to add children JFrames (or JPanels or whatever is it for children windows) 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:53:49+00:00Added an answer on May 13, 2026 at 1:53 pm

    … But there’s something wrong with this
    method: when I close child window via
    x in the upper right corner, whole
    program terminates as if I was closing
    the main window. …

    Well, I would say you are on the right path. Just make sure that you do the following for your child frames :

    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    

    Then closing the child windows won’t shut down your entire application.

    HTH ! 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know it's a simple question but I really can't find anything on Google.
Sorry for probably simple question but I'm a newby in Django and really confused.
Really stupid question, sorry, but I can't find it on google (I'm sure it's
I have a really simple question here, but I just can't find an answer
A really php newbie here, sorry if the question is too simple. I’m following
Sorry if this is a really basic question but it's been really getting to
Sorry for the beginner question, but I can't figure out cProfile (I'm really new
I'm sorry if there is a stupidly simple answer to this question, but I've
I am really sorry to post this question, because most likely the solution will
I didnt know how to word the question, so sorry if it doesnt really

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.