This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to close or exit of one of two opened windows?

 
Mindy Wu
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I created a swing application e.g A, when use clicks a button in A, it will display B ( another swing interface). My question is how to close B when user clicks Close Button in B without close A.
I know you can set
"frame.setDefaultCloseOperation JFrame.DISPOSE_ON_CLOSE);" to close the frame when user clicks x. If i use System.exit(0), it will cause all of the opening swing screen exit.
Wating for you help!
Thanks!
Mindy
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
frame.dispose();
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic