• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

closing JFrame on button click

 
Mary Anu
Greenhorn
Posts: 10
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have one popup window(edit.jsp) from which i am opening an applet which contains JFrame.

public class myApplet extends JApplet
{
.......
JFrame f = new JFrame();
f.getContentPane().add(new JScrollPane(imagepanel));
f.getContentPane().add(buttonsPanel, "South");
f.setSize(975,600);
f.setLocation(50,50);
f.setVisible(true);
....
....
}

I have one Close button in buttonsPanel. I want to close this applet window on clicking the close button. The action events are handled by a different class ToolBoxListener which implements ActionListener.

And I want to close the popup(edit.jsp) also upon closing the applet.

Any idea how to do this?

Regards
Anu.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Applet forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic