🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Solved: JDialog Problem

#11386
From: Tad Frysinger
Date: Sun, 06 Jun 1999 00:00
22 lines
1284 bytes
In article <375640B1.40CDB7F4@gmx.de>, matthias.bandemer@gmx.de says...
> Hi,
> 
> I have searched DejaNews and have found the solution. Here is the code :
> 
> JFrame topFrame = (JFrame) this.getTopLevelAncestor();
> JDialog topDialog = new JDialog(topFrame, "title", true);
> topDialog.show();
> 
> Now it works fine, but I wonder what the first line means. Is this a
> kind of a casting-methode? I have never seen this before. Any comments ?
> 
> Thanks
> 
> Matthias
> Matthias Bandemer wrote:
> > 
This isn't a "kind of" casting method, it is the way casting works in 
Java.  JFrame is a container, so you are casting to the more specific 
type of object, so that you can then pass it to the JDialog constructor.  

Tad Frysinger(TeamB)
Technical Details
Message-ID: <MPG.11c45a35bb1a4cc2989a0e@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <375585BB.1F9323B5@gmx.de> <7j4fkb$jmc9@forums.borland.com> <37563987.834091D@gmx.de> <375640B1.40CDB7F4@gmx.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c40ee21b1dbc2637
X-Google-Attributes: gid111d45,public
From: tfrysinger@earthlink.net (Tad Frysinger)
Subject: Re: Solved: JDialog Problem
Date: 1999/06/06
Message-ID: <MPG.11c45a35bb1a4cc2989a0e@forums.borland.com>
X-Deja-AN: 486361322
References: <375585BB.1F9323B5@gmx.de> <7j4fkb$jmc9@forums.borland.com> <37563987.834091D@gmx.de> <375640B1.40CDB7F4@gmx.de>
Organization: Freezone Enterprises
Newsgroups: borland.public.jbuilder.java.swing