🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16080

Window closing

#16080
From: Leo Cohen
Date: Mon, 05 Apr 1999 00:00
28 lines
1210 bytes
My application has several JDialogs on screen when I bring up a text
editor that puts up a Frame with the window close control, X, in the
title bar.

I use the following for the window closing event:

   public void windowClosing(WindowEvent event) {
      if (isItSafe(QUIT))
         setVisible(false);
   }

The problem is, pressing X closes the window regardless of the outcome
of isItSafe(),AND, it closes the application.

if isItSafe() is false, how do I keep the text editor window open, and
not close down the app?

-- 
Leo Cohen

116-1 Howard Drive
Charlottesville, VA  22903

804-243-8922 (UVA)
804-244-4648 (home)
804-244-7922 (home fax)
815-550-9313 (office fax)
lcohen@cs.virginia.edu
Technical Details
Message-ID: <3708DD9B.9AAECFA6@cs.virginia.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,954b4089dc4b413b,start
X-Google-Attributes: gidf74b3,public
From: Leo Cohen <lcohen@cs.virginia.edu>
Subject: Window closing
Date: 1999/04/05
Message-ID: <3708DD9B.9AAECFA6@cs.virginia.edu>
X-Deja-AN: 462902676
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language