This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

why won't my pop up window close?

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I open a window when an alert has happened, but if I try to click the x button in the top right corner, it won't close. Do I have to do something to build that functionality into the window? Heres my code. Thanks.

[ June 05, 2002: Message edited by: tyler jones ]
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tyler,
Since you are doing this from an Applet (assumption since this is the applet forum) you can't use System.exit() call. You can however use the dispose method:

Regards,
Manfred.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rather than doing it this way just create a constructor of ur frame & set all the parameters for the frame like setSize setVisible in the constructor.
add ur window adapter method also in that
it will work fine.
 
tyler jones
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help, but that didn't get the window to close. Here's my complete code. Maybe I'm doing something else that's keeping it from being able to close? Thanks.
 
tyler jones
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, I figured out what I needed to do to make it work. Thanks for your help.
 
You showed up just in time for the waffles! And this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic