Article View: borland.public.jbuilder.java.swing
Article #11938Re: InternalFrameEvent
From: Stan Reinis
Date: Tue, 16 Mar 1999 00:00
Date: Tue, 16 Mar 1999 00:00
29 lines
1397 bytes
1397 bytes
I did run into this problem with JInternalFrames. It seemed
that internalFrameClosed was called twice if the frame I was
closing was not in focus. I couldn't figure out why it was
happening so I hacked it with a boolean "has_closed", in
the internalFrameClosed method:
(Initially has_closed = false.)
if( !has_closed)
{
//Do your closed stuff.
has_closed = true;
}
Stan
Bee Siu wrote:
> Hi all,
>
> In my program, I use InternalFrameListener to listen the
> internalFrameClosed event of an InternalFrame. However, when I run the
> program and close the InternalFrame by dispose() method, the
> InternalFrame fires the internalFrameClosed event twice so that the
> statements in the event listener method are run twice. I don't know why.
>
> Hope anyone can help. Thanks.
>
> Bee
Technical Details
Message-ID:
<36EEDFEF.EF1D3AF4@terren.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36D28F87.1628C036@risingmore.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,791f9c76fbb8a2c8 X-Google-Attributes: gid111d45,public From: Stan Reinis <stan@terren.com> Subject: Re: InternalFrameEvent Date: 1999/03/16 Message-ID: <36EEDFEF.EF1D3AF4@terren.com> X-Deja-AN: 455820058 Content-Transfer-Encoding: 7bit References: <36D28F87.1628C036@risingmore.com> X-Accept-Language: cs,ru Content-Type: text/plain; charset=us-ascii Organization: Terren Corporation Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing