🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1312

Re: How to close a JOptionPane by program ?

#1312
From: Michael Köhler
Date: Tue, 26 Feb 2002 01:13
30 lines
2196 bytes
you have to deliver a window close event to this component..

but the hell.. if u want to close by a timeout just make a subclass of the 
optionpane, implement the runnable stuff and keep on counting the 
milliseconds..

m.

Laurent Souriau wrote:

>         Hi everyone,
> 
> 
> Here is my problem : I created a JOptionPane with the following lines
> of code, and i would like to select by program one of the options,
> or the CLOSED_OPTION. Is it possible and how ?
> 
> final JOptionPane toto = new JOptionPane("coucou");
> Object[] options = new String[] {"jaune","vert","bleu"};
> 
toto.showOptionDialog(this,"youhou","coucou",JOptionPane.YES_NO_CANCEL_OPTIO
> N,1,null,options,options[0]);
> 
> Thank you
> 
> Laurent
> email : lsouriau@club-internet.fr
> 
> 
> 
Technical Details
Message-ID: <a5ekko$6o9ip$3@news.hansenet.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!a089250.adsl.hansenet.DE!not-for-mail
References: <9q1q6g$hkk$1@s1.read.news.oleane.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a146,d826ee1d5a5a9f09,start
X-Google-Attributes: gid10a146,public
X-Google-Thread: 113ae9,3265f80de2e3c1e7
X-Google-Attributes: gid113ae9,public
X-Google-Thread: f631b,3265f80de2e3c1e7
X-Google-Attributes: gidf631b,public
X-Google-Thread: 1089d0,3265f80de2e3c1e7
X-Google-Attributes: gid1089d0,public
X-Google-Thread: f74b3,3265f80de2e3c1e7
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2002-02-25 16:24:58 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!a089250.adsl.hansenet.DE!not-for-mail
From: Michael Köhler <w.elldoneNOSPAM@web.de>
Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language,comp.lang.java.help,comp.lang.java.programmer,fr.comp.lang.java
Subject: Re: How to close a JOptionPane by program ?
Followup-To: borland.public.jbuilder.java.api
Date: Tue, 26 Feb 2002 02:13:44 +0100
Lines: 31
Message-ID: <a5ekko$6o9ip$3@news.hansenet.net>
References: <9q1q6g$hkk$1@s1.read.news.oleane.net>
NNTP-Posting-Host: a089250.adsl.hansenet.de (213.191.89.250)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
X-Trace: fu-berlin.de 1014683096 7087705 213.191.89.250 (HANSENET 7087705)
User-Agent: KNode/0.4