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!
    Bookmark Topic Watch Topic
  • New Topic

badlt stuck with GUI problem

 
Abhi Chat
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am makin the GUi which has the main frame and container inside the
public class...now i have an inner class which opens another
frame as a popup.... now when i try to close the popup then the entire
application closes.

heres the code for the popup class...

JPanel panel = new JPanel();


JFrame frame = new JFrame( "Graphs" );

frame.setSize(200,200);
frame.getContentPane().add( panel );
frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);

//Make sure we have nice window decorations.
frame.setDefaultLookAndFeelDecorated(true);

//Display the window.
frame.pack();
frame.setVisible(true);


please advice
 
Matt Sheehan.
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Change this:

to this:


Matt
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same thread in multiple forums. It makes a conversation difficult to follow, and wastes peoples time when they answer a question that's already been answered elsewhere.

Please continue teh conversation here.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic