Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

"Close Window" Script

  Asked By: Leona    Date: Jun 12    Category: Java    Views: 799
  

I want to write a script that closes a pop up window if the user clicks on the
"Close Window" buttom. Can anyone help?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Latasha Wilson     Answered On: Jun 12

For window  closing you can
use:<br><br>button1.addActionListener(new java.awt.event.ActionListener() {<br>
public void
actionPerformed(ActionEvent e) {<br> dispose();<br> }<br>});

 
Didn't find what you were looking for? Find more on "Close Window" Script Or get search suggestion and latest updates.




Tagged: