close JFrame?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lem

    close JFrame?

    How do I close a JFrame Window, other than calling system.exit(0) or
    dispatchEvent() ?

    Thanks in advance,
    Lem


  • al

    #2
    Re: close JFrame?

    you can use the setVisible method and set it to false and your JFrame will
    close

    "Lem" <hjlem@pacific. net.sg> wrote in message
    news:bgdr93$mlv $1@nobel2.pacif ic.net.sg...[color=blue]
    > How do I close a JFrame Window, other than calling system.exit(0) or
    > dispatchEvent() ?
    >
    > Thanks in advance,
    > Lem
    >
    >[/color]


    Comment

    • surte

      #3
      Re: close JFrame?

      "al" <aljohnson18@ho tmail.com> wrote in message news:<bzuXa.119 41$bo1.3923@new s-server.bigpond. net.au>...[color=blue]
      > you can use the setVisible method and set it to false and your JFrame will
      > close
      >
      > "Lem" <hjlem@pacific. net.sg> wrote in message
      > news:bgdr93$mlv $1@nobel2.pacif ic.net.sg...[color=green]
      > > How do I close a JFrame Window, other than calling system.exit(0) or
      > > dispatchEvent() ?
      > >
      > > Thanks in advance,
      > > Lem
      > >
      > >[/color][/color]

      You can use
      hide ();//hides the frame
      dispose ();// terminates the frame

      Comment

      Working...