🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1369

Re: Dialog box association

#1369
From: Matthew Sweet
Date: Tue, 16 Dec 2003 18:06
24 lines
2290 bytes
I get the same result with what you suggested. Before I had
(Frame)SwingUtilities.getAncestorOfClass(Frame.class, this) I guess they are
doing the same thing. Ultimately my problem is that I lose my dialog box in
the background when I click on another window and back onto my application
window. Is this a problem with an incorrect association or do I need to call
some other function to make it come back?


"Gillmer J. Derge (TeamB)" <spam@gillmerderge.com> wrote in message
news:3fdf40cd$1@newsgroups.borland.com...
> "Matthew Sweet" <matthew.sweet@sed.redstone.army.mil> wrote in message
> news:3fdf2537$1@newsgroups.borland.com...
> > I can't get to the Frame component from that
> > last JPanel class to pass it into the JDialog class I created.
>
> (JFrame)SwingUtilities.windowForComponent(panel);
>
> Since windowForComponent returns a Window, you might want to verify that
> it's an instance of JFrame before casting it, but this shows the basic
> idea.
>
> -- 
> Gillmer J. Derge (TeamB)
>
Technical Details
Message-ID: <3fdf4a1a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!chcgil2-snh1.gtei.net!news.bbnplanet.com!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!peernews3.colt.net!news0.de.colt.net!news.ipv6.iphh.net!iphh.net!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fde2463@newsgroups.borland.com> <3fde265c$1@newsgroups.borland.com> <3fdf2537$1@newsgroups.borland.com> <3fdf40cd$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,55c92298dba121d1
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2003-12-16 10:11:54 PST
Reply-To: "Matthew Sweet" <matthew.sweet@sed.redstone.army.mil>
From: "Matthew Sweet" <matthew.sweet@sed.redstone.army.mil>
Newsgroups: borland.public.jbuilder.java.swing
References: <3fde2463@newsgroups.borland.com> <3fde265c$1@newsgroups.borland.com> <3fdf2537$1@newsgroups.borland.com> <3fdf40cd$1@newsgroups.borland.com>
Subject: Re: Dialog box association
Date: Tue, 16 Dec 2003 12:06:32 -0600
Lines: 26
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: 136.205.73.67
Message-ID: <3fdf4a1a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1071598106 136.205.73.67 (16 Dec 2003 10:08:26 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!chcgil2-snh1.gtei.net!news.bbnplanet.com!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!peernews3.colt.net!news0.de.colt.net!news.ipv6.iphh.net!iphh.net!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail