Article View: borland.public.jbuilder.java.swing
Article #1552Re: How to close a JDialog
From: Kevin Dean
Date: Fri, 31 Oct 2003 11:24
Date: Fri, 31 Oct 2003 11:24
69 lines
3195 bytes
3195 bytes
((JDialog)okButton.getParent().getParent()).dispose();
--
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:3fa19f13$1@newsgroups.borland.com...
> 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:
<3fa24673@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!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> <3fa19f13$1@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-31 03:39:08 PST From: "Kevin Dean" <NkOdSePaAnM@datadevelopment.com> Newsgroups: borland.public.jbuilder.java.swing References: <3fa1769a@newsgroups.borland.com> <3fa191d8@newsgroups.borland.com> <3fa19f13$1@newsgroups.borland.com> Subject: Re: How to close a JDialog Date: Fri, 31 Oct 2003 06:24:24 -0500 Lines: 71 Organization: Dolphin Data Development Ltd. 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: 24.57.150.243 Message-ID: <3fa24673@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067599475 24.57.150.243 (31 Oct 2003 03:24:35 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail