Article View: borland.public.jbuilder.java.swing
Article #1549Re: How to close a JDialog
From: Mynor Paredes
Date: Thu, 30 Oct 2003 23:30
Date: Thu, 30 Oct 2003 23:30
53 lines
2646 bytes
2646 bytes
I'll be a little more detailed....... This is what I have:
void jbtn_a_actionPerformed(ActionEvent e) {
jp_List jp_List = new jp_List();
JDialog jd_List = new JDialog() ;
jd_List.getContentPane().add(jp_List) ;
jd_List.setModal(true);
jd_List.setUndecorated(true);
jd_List.setLocation(jtxt_Code.getLocationOnScreen());
jd_List.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
jd_List.pack();
jd_List.show();
jtxt_Code.setText(jp_CoList.s_Cd) ;
jtxt_CoCode.requestFocus();
}
The point is that the "Ok" and "Cancel" buttons are inside the jp_List
panel. How do I do to get the JDialog where the jp_List is contained, and
then make the dispose?
Thank you.
Mynor Paredes.
"Kevin Dean" <NkOdSePaAnM@datadevelopment.com> wrote in message
news:3fa191d8@newsgroups.borland.com...
> Call the dispose() method.
>
> --
> Check out our latest white papers at
> http://www.datadevelopment.com/papers/index.html
>
> BladeNET Scores With Borland Enterprise Tools
> Team Development with JBuilder and Borland Enterprise Server
>
> Dolphin Data Development Ltd.
> http://www.datadevelopment.com/
>
> "Mynor Paredes" <paredes_mynor@hotmail.com> wrote in message
> news:3fa1769a@newsgroups.borland.com...
> > Hello. I have a JDialog (jdlg_a) with a JPanel(jp_a) as a component.
> > The jdlg_a is undecorated.
> > jp_a has 2 buttons, "Ok" and "Cancel". When I press any of these
buttons,
> I
> > want the jdlg_a to be closed, how can I do this?
> >
> > Thank you four your help.
> > Mynor Paredes
> >
> >
>
>
Technical Details
Message-ID:
<3fa19f13$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fa1769a@newsgroups.borland.com> <3fa191d8@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,9b06c5d510019547 X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2003-10-30 15:39:24 PST Reply-To: "Mynor Paredes" <paredes_mynor@hotmail.com> From: "Mynor Paredes" <paredes_mynor@hotmail.com> Newsgroups: borland.public.jbuilder.java.swing References: <3fa1769a@newsgroups.borland.com> <3fa191d8@newsgroups.borland.com> Subject: Re: How to close a JDialog Date: Thu, 30 Oct 2003 15:30:28 -0800 Lines: 55 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 66.122.154.62 Message-ID: <3fa19f13$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067556627 66.122.154.62 (30 Oct 2003 15:30:27 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail