🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Frame/Window

#19907
From: Roger
Date: Fri, 21 Nov 1997 00:00
24 lines
1128 bytes
Hi Carl,

Try this:

         Container f = getParent();
         while(f != null && !(f instanceof Frame)) {
             f = f.getParent();
         }
         if (f == null) {
             System.out.println("Couldn't get applet's frame.");
             return;
         }

Good luck, roger  :~)


Carl Hewitt wrote:

> How do I find the topmost window in an application?
>
> TIA
>
> Carl
Technical Details
Message-ID: <3475E14E.AE4B0525@wli.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <347440C3.D0B76A6B@oop.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: 10fd6d,753c9b5de73c4539
X-Google-Attributes: gid10fd6d,public
X-Google-Thread: fecd1,753c9b5de73c4539
X-Google-Attributes: gidfecd1,public
X-Google-Thread: f74b3,753c9b5de73c4539
X-Google-Attributes: gidf74b3,public
From: Roger <pagan@wli.net>
Subject: Re: Frame/Window
Date: 1997/11/21
Message-ID: <3475E14E.AE4B0525@wli.net>
X-Deja-AN: 291279455
References: <347440C3.D0B76A6B@oop.com>
Reply-To: pagan@well.com
Organization: WinterLAN Inc.
Newsgroups: borland.public.jbuilder.java.language,comp.lang.java.gui,comp.lang.java.programmer,comp.lang.java.api