🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #19880

Re: Frame/Window

#19880
From: David Parry
Date: Tue, 02 Dec 1997 00:00
41 lines
2084 bytes

I'm currently working on a 'ToolTip' utility for Components and
recently needed to get a 'Frame' within the parent tree of those
Components.

Working back up a Component's family tree using getParent() seems OK.

I believe 'java.awt.Frame.class.isInstance(_object_)' is safer and
more accurate than the normal 'instanceof()' for type checking and
should be used anyhow as Sun is moving toward multiple inheritance
'soon' (...well that's what the white papers say anyhow!)

Hope this helps!

Dave


On Wed, 26 Nov 1997 08:31:01 -0800, Mark Hunter
<mhunter@sprintmail.com> wrote:
>Mark: thanks for the reply. I tried using instanceof before I posted the
>message, but wasn't successful.
>
>"Container" is the *parent* class of "Window". Is that why instanceof
>always returns false for this expression?
>
>Container c
>c instanceof Window
>
>Documentation is sketchy, but it says instanceof will test for c being
>*derived* from Window, and of course it isn't.

-------------------------------
David H Parry. david@cyba.co.uk

Check out our Cyba Java Site on
 http://www.demon.co.uk/cyba/
------
Save bandwidth
....don't have a sig  8^)
-------------------------------
Technical Details
Message-ID: <348396f8.53008495@news.dial.pipex.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <347440C3.D0B76A6B@oop.com> <3475E14E.AE4B0525@wli.net> <gmcgath-ya02408000R2111972049260001@news.ma.ultranet.com> <347B8824.429C@dpsla.com> <347BAA44.8880B08E@ix.netcom.com> <347C4EC5.4DDA@sprintmail.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a146,753c9b5de73c4539
X-Google-Attributes: gid10a146,public
X-Google-Thread: f74b3,753c9b5de73c4539
X-Google-Attributes: gidf74b3,public
X-Google-Thread: 10fd6d,753c9b5de73c4539
X-Google-Attributes: gid10fd6d,public
X-Google-Thread: fecd1,753c9b5de73c4539
X-Google-Attributes: gidfecd1,public
From: david@cyba.co.uk (David Parry)
Subject: Re: Frame/Window
Date: 1997/12/02
Message-ID: <348396f8.53008495@news.dial.pipex.com>
X-Deja-AN: 294399788
References: <347440C3.D0B76A6B@oop.com> <3475E14E.AE4B0525@wli.net> <gmcgath-ya02408000R2111972049260001@news.ma.ultranet.com> <347B8824.429C@dpsla.com> <347BAA44.8880B08E@ix.netcom.com> <347C4EC5.4DDA@sprintmail.com>
Organization: Cyba
Newsgroups: borland.public.jbuilder.java.language,comp.lang.java.gui,comp.lang.java.programmer,comp.lang.java.api