closing one JFrame without closing the application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pankajs
    New Member
    • Mar 2008
    • 36

    closing one JFrame without closing the application

    Hi ! I want to know that how I can close one JFrame without exiting the program when two or more JFrame are being used ??????
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Always first read the API documentation before you attempt to craft any code.
    Have a look at the setDefaultClose Operation(int operation) method description.

    kind regards,

    Jos

    Comment

    • sukatoa
      Contributor
      • Nov 2007
      • 539

      #3
      Have a look also on dispose() method.....

      Maybe, you should download the API docs.....

      sukatoa.

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by sukatoa
        Have a look also on dispose() method.....
        Better not; the dispose method gets rid of all the native screen resources and
        the window needs to be reconstructed again if you want to make it visible again.
        Better use the setVisible() method if you need to.

        kind regards,

        Jos

        Comment

        Working...