Results 1 to 2 of 2
  1. #1
    tnixon22 is offline Member
    Join Date
    Jan 2011
    Rep Power

    Default exit code for JApplet

    I am writing a JApplet for school. I want to include an exit button, and I am placing System.exit(0) in the actionperformed method for the button, but it does not close the viewer. Is there a code that can be put into the actionperformed method to make the button work like I want it to?

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Rep Power


    Applets were desinged to be displayed on a webpage viewed through a browser. The applet remains on the page until user navigates to another page or closes the browser. Your desired behaviour does not make sense. You can have a button to stop the applet running but as I said it remains on screen.

Similar Threads

  1. JVM terminated.Exit code=13
    By Hussain Ali in forum Eclipse
    Replies: 2
    Last Post: 11-02-2010, 10:02 AM
  2. shell exit code
    By mac in forum New To Java
    Replies: 2
    Last Post: 05-17-2010, 11:58 PM
  3. JFrame to JApplet or JApplet to JApplet
    By ramesh.8189 in forum AWT / Swing
    Replies: 13
    Last Post: 02-08-2009, 06:14 AM
  4. JVM terminated Exit code=1
    By oregon in forum Eclipse
    Replies: 3
    Last Post: 09-29-2008, 09:49 PM
  5. [SOLVED] exit code 2
    By antgaudi in forum New To Java
    Replies: 2
    Last Post: 09-21-2008, 10:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts