Article View: borland.public.jbuilder.java.swing
Article #9775Re: JOptionPane.showInternalConfirmDialog() getValue() method dosnt work??
From: Jesper Berglund
Date: Tue, 25 Jan 2000 00:00
Date: Tue, 25 Jan 2000 00:00
75 lines
2621 bytes
2621 bytes
This is a multi-part message in MIME format.
--------------EF6063F5363811CA39D7715A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hiya Muthu!
This shold solve your problem.
String tConfirmString = (String)JOptionPane.showInternalInputDialog(this,"Enter
savename:","Save file", JOptionPane.QUESTION_MESSAGE);
if(tGroupName != null)
{
//do stuff with string
}
or do it this way:
int tRetVal = JOptionPane.showInternalConfirmDialog(this,"Do you want to
continue?", "Add File to Project" ,JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE);
if (tRetVal == JOptionPane.YES_OPTION)
{
//Save the file
}
Later!
Jesper Berglund
Data Ductus AB
Sweden
Muthu wrote:
> when i use showInternalConfirmDialog() overloaded method to show a dialog
> window, the getValue() method dosnt retrieves the value user has selected.
> insted it returns a message saying "uninitializedValue"
>
> getValue() work fine on JDialog but why not for showInternalConfirmDialog()
> ???
>
> how can i initialize the values ? i'v tryed follwing way but it didnt work
> out...
>
> JOptionPane pane = new JOptionPane();
> pane.showInternalConfirmDialog(jdtpn2,"Do you wont to save the
> query","Message",pane.YES_NO_CANCEL_OPTION);
> Object result = pane.getValue();
> System.out.println(result);
--------------EF6063F5363811CA39D7715A
Content-Type: text/x-vcard; charset=us-ascii;
name="jesper.berglund.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jesper Berglund
Content-Disposition: attachment;
filename="jesper.berglund.vcf"
begin:vcard
n:Berglund;Jesper
tel;cell:+46 (0)70 - 555 7954
tel;work:+46 (0)910 - 73 23 00
x-mozilla-html:FALSE
url:http://www.dataductus.se
org:Data Ductus;Development
adr:;;;Skellefte�;;;Sweden
version:2.1
email;internet:Jesper.Berglund@dataductus.se
title:Software Engineere
fn:Jesper Berglund
end:vcard
--------------EF6063F5363811CA39D7715A--
Technical Details
Message-ID:
<388DC409.B80233C@dataductus.se>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<86960s$ibp7@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,569c179d91546360 X-Google-Attributes: gid111d45,public From: Jesper Berglund <jesper.berglund@dataductus.se> Subject: Re: JOptionPane.showInternalConfirmDialog() getValue() method dosnt work?? Date: 2000/01/25 Message-ID: <388DC409.B80233C@dataductus.se> X-Deja-AN: 577418055 References: <86960s$ibp7@bornews.borland.com> X-Accept-Language: en Content-Type: multipart/mixed; boundary="------------EF6063F5363811CA39D7715A" X-Trace: 25 Jan 2000 16:40:41 +0100, ns.boliden.se MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing