Community articleClosing a Form
Added by IBM contributorIBM on May 6, 2011
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Next, you must free the memory used by the form. This is the last operation in the main method of the program.
  1. The program's main method calls the API’s destroy method to delete the theForm object.
  2.             theForm.destroy( );

  3. Display any exceptions before terminating.
  4.          catch (Exception ex)
                ex.printStackTrace( );

Parent topic: Developing an application in Java