🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Invincible JDialog box !

#8390
From: Trejkaz Xaoza
Date: Mon, 18 Sep 2000 00:00
31 lines
1667 bytes

"John P. McGrath" wrote:
> 
> On Mon, 11 Sep 2000 22:13:30 -0500, Joi Ellis wrote:
> 
> > Wilson wrote:
> >
> > > Is there a way to prevent a JDialog from being closed?
> > > (ie. not have an X at the corner, or disallow alt-F4, etc.)
> >
> > Perhaps replace it with a JOptionPane inside a JWindow?
> 
[snip]
> If you want the user to be able to move the window, you might try using
> the following:
> 
>    dialog.setDefaultCloseOperation( JDialog.DO_NOTHING_ON_CLOSE );
> 
> This will give you the title bar with all of the usual buttons, but the
> close button and Alt-F4 should have no effect.  Note that the button will
> still appear as "enabled".  You can also add a WindowListener and catch
> the close event with the windowClosing() method.


This is all well and good, but it doesn't actually stop the user getting
back to the windows desktop, as the originator of this thread wanted. 
Just
because a window is covering the whole screen doesn't mean you can't
access
the desktop in the background...
Technical Details
Message-ID: <39C59BC8.1039477E@xaoza.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39bd9c36$1_2@dnews> <39BD9F5A.C30EA803@aravox.com> <MPG.1428c000965990bc989b2b@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,b0cf979e993e26dd,start
X-Google-Attributes: gid111d45,public
From: Trejkaz Xaoza <trejkaz@xaoza.net>
Subject: Re: Invincible JDialog box !
Date: 2000/09/18
Message-ID: <39C59BC8.1039477E@xaoza.net>
X-Deja-AN: 671055684
Content-Transfer-Encoding: 7bit
References: <39bd9c36$1_2@dnews> <39BD9F5A.C30EA803@aravox.com> <MPG.1428c000965990bc989b2b@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: 17 Sep 2000 20:26:20 -0800, 203.18.229.41
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing