Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to close applet on click of a button

 
Vishnu Murthy
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created an applet having some buttons and also a button "close".
what i want is on click of the close button the applet should close. i have tried with system.exit(0) with in a userdefined function to close the applet window, but i am not able to close the applet window.
kindly send me the code which will close the window.
thanks in advance
vishnu
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Vishnu,
Why do u need to close the applet? in fact applet are supposed to be closed when the browser window containing them is closed by the user.System.exit() does not work with applet.


regards
deeksha
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic