• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to close a popup window

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i've a link in my parent window. which when clicked will open a popup window. In this popup window, i've a applet running.Ive a button called exit which when clicked should close only the popup window.

But, when i use system.exit(0) it closes the popup and as well as the parent window.
Give me a better solution to close only that popup window.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alex,
Instead of calling System.exit( 0 ) in the actionListener for the button call .setVisible( false ) on a reference to the frame or dialog that holds the popup window. i.e. the name of your popup window.
HTH,
-Nate
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frame extends Window. Window has a dispose() method that realeases the window/frame. In the previous reply if you setVisible to false, you still has an instance of the popup. This isn't necessarily bad, if you want the applet to popup more than once in the course of the running program
Mark Spritzler
 
reply
    Bookmark Topic Watch Topic
  • New Topic