🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Urgent: Problem with textfield validation on frame closing

#11169
From: Matt Krevs
Date: Mon, 05 Jul 1999 00:00
36 lines
1954 bytes
I'm no expert on this but I think you need to look at
setDefaultCloseOperation(). I think you'll need to use the
DO_NOTHING_ON_CLOSE constant.

You will need to add an InternalFrameListener that stops the window from
closing given certain circumstances.

Anyone know for sure?

Keith Cheng <Keith_Cheng@excel.com.hk> wrote in message
news:377F7F99.11AC91DA@excel.com.hk...
> Hi,
>     I am now struggling on handling validation exception when the user
> close the internal frame.  Please give me a hand.
>     My situation is I have many internal frames using one genernal close
>
> button on the toolbar which set the internal frames invisible upon
> clicking.  However, the textfields in some of the internal frames use
> focus lost for validation (show Dialog message for validation
> exception).
>     In that case, if the close button is clicked when the focus is on a
> textfield having focus lost validation and the validtion exception
> throws.  The internal frame is hidden, but then the Dialog message shown
>
> due to focus lost validation.
>     So, how to make the Dialog message show before the internal frame is
>
> hidden.
>     Or, simply make the Dialog message never show when close button is
> clicked.
>
>     Any suggestion or hint are appreciated.
>
> Thanks,
> Keith.....
>
Technical Details
Message-ID: <7losth$8la8@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <377F7F99.11AC91DA@excel.com.hk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,fef3bfb6cfc40573
X-Google-Attributes: gid111d45,public
From: "Matt Krevs" <mattkrevs@flex.com.au>
Subject: Re: Urgent: Problem with textfield validation on frame closing
Date: 1999/07/05
Message-ID: <7losth$8la8@forums.borland.com>
X-Deja-AN: 497196754
References: <377F7F99.11AC91DA@excel.com.hk>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Reply-To: "Matt Krevs" <mattkrevs@flex.com.au>
Newsgroups: borland.public.jbuilder.java.swing