Have a boolean variable indicating the state of the dialog ie
if(!DialogIsOpen){
         openDialog();
         DialogIsOpen = true;
}


----- Original Message -----
From: "Prasad Vootla" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 11, 2001 6:07 AM
Subject: Single instance of a Dialog


> Hello all,
> This question is to do with AWT Dialog, but I'm sure that it is
> valid in Swing too. How do I make sure that there is only a single
instance
> of my Dialog at any time. I launch a Dialog from a menu option and I want
to
> make sure that even if the option is chosen many times only a single
Dialog
> instance appears. It has to be a non-modal Dialog. I know that  Singleton
> Pattern implementation can do the job.. but want to know if AWT provides
any
> other ways of specifying only one instance for a Dialog
> Thanks
> -Prasad
>
>
> ***************************************************************
> Confidentiality note: This e-mail contains information from the
> GFI Group Inc. and/or its affiliates, including GFInet inc.,
> that is confidential and/or legally privileged.   This
> information is intended only for the use of the individual or
> entity named on this e-mail.  This e-mail and its content may
> not be reproduced or retransmitted without the express written
> permission of The GFI Group.
> ***************************************************************
> _______________________________________________
> Advanced-swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/advanced-swing
>

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to