aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes badlt stuck with GUI problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply locked New topic
Author

badlt stuck with GUI problem

Abhi Chat
Ranch Hand

Joined: Oct 10, 2004
Posts: 57
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


SCJP 1.4<br />Preparing for <br />SCJD and SCWCD
Matt Sheehan.
Ranch Hand

Joined: Oct 08, 2004
Posts: 63
Change this:

to this:


Matt
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

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.
 
 
subject: badlt stuck with GUI problem