🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10678

Re: Preventing close of JInternalFrame

#10678
From: Jim Stoll
Date: Wed, 18 Aug 1999 00:00
27 lines
1790 bytes
I see what you're talking about w/ the default listener - chances are that it's
actually doing the close.  I am, however, calling the
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE) in my constructor and it's still
happening, though.

Just found something that claims the _only_ way to intercept a close on a
JInternalFrame is to implement a VetoableChangeListener - counter to everything
else I've read (which was all, admittedly, a bit sketchy - of the form, "and the
event can be intercepted..." w/o details), but it works.

Jim

nlaan wrote:

> You are _adding_ a Listener to the MDISheet.  That listener gets _added_ to
> a list of Listeners which consists of your listener and the default
> JInternalFrame Listener.  It is the default JInternalFrame Listener which is
> closing the MDISheet.
>
> I beleive that calling this method in your Constructor will get around your
> problem, but I have not tested it...
>
> setDefaultCloseOperation(this.DO_NOTHING_ON_CLOSE);
>
> Jim Stoll wrote in message <37BB2406.ABEB620D@crtnet.com>...
> >I'm trying to intercept the close of a JInternalFrame and I think I'm
> >doing it correctly, but it's not working.  Any suggestions??
Technical Details
Message-ID: <37BB2C0A.CB9B343@crtnet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37BB2406.ABEB620D@crtnet.com> <7pf8j6$30v1@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,6a1846c8084a630a
X-Google-Attributes: gid111d45,public
From: Jim Stoll <jestoll@crtnet.com>
Subject: Re: Preventing close of JInternalFrame
Date: 1999/08/18
Message-ID: <37BB2C0A.CB9B343@crtnet.com>
X-Deja-AN: 514387997
Content-Transfer-Encoding: 7bit
References: <37BB2406.ABEB620D@crtnet.com> <7pf8j6$30v1@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing