🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Frame's WINDOW_CLOSING event does not validate component with focus

#8688
From: Jeroen Zwartepoorte
Date: Mon, 31 Jul 2000 00:00
17 lines
1454 bytes
Catch the WINDOW_CLOSING event and transfer focus to some part of the frame
of which you are sure that it doesn't need any validating etc. Then just
call System.exit(0);

Jeroen

"Chris Vinson" <nospamVinsonCL@pebio.com> wrote in message
news:39809FD6.E5176805@appliedbiosystems.com...
> When the user clicks on the EXIT button at the top-right of an
> application's frame (the 'X' on a windows app) -or- when the user
> invokes the ALT-F4 keyboard accelerator, the frame receives a
> processWindowEvent() message where id=WINDOW_CLOSING without sending a
> focusLost() message to the component with keyboard input focus.  I'd
> like to be able to send a focusLost() message to the GUI component that
> has focus before the processWindowEvent() gets fired to trigger the
> component's validation process.  Does anyone know how to do this?
>
Technical Details
Message-ID: <8m5ssd$4du7@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39809FD6.E5176805@appliedbiosystems.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,ffc0d847a062e938
X-Google-Attributes: gid111d45,public
From: "Jeroen Zwartepoorte" <Jeroen@xs4all.nl>
Subject: Re: Frame's WINDOW_CLOSING event does not validate component with focus
Date: 2000/07/31
Message-ID: <8m5ssd$4du7@bornews.borland.com>
X-Deja-AN: 653107519
References: <39809FD6.E5176805@appliedbiosystems.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing