Search:

Type: Posts; User: helloworld922

Search: Search took 0.10 seconds.

  1. Replies
    13
    Views
    2,621

    Re: Creating a close button

    You never set the window field to anything so it's null to begin with. I'm guessing you want it to dispose of the current window so in your constructor you can set window to this.

    Better yet,...
  2. Replies
    13
    Views
    2,621

    Re: Creating a close button

    System.exit() will terminate your program, full stop (well, there are a few bits of code you can get to run after/inside of System.exit(), but essentially it's the end).

    The primary reason not to...
  3. Replies
    13
    Views
    2,621

    Re: Creating a close button

    The method you are looking for is called dispose.
Results 1 to 3 of 3