🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Accessing Components of top-level Frame?

#225
From: Paul Nichols TeamB
Date: Mon, 01 Jan 2007 23:21
27 lines
2420 bytes
Tom Giammo wrote:
> Paul:
> 
> Thanks for responding.
> 
> Your approach is ingenious and no doubt would work.  I had begun to explore 
> along those lines myself, but couldn't keep straight in my mind which 
> variables would be visible to the components within the top-level frame.  I 
> ultimately gave up on the basis that something so simple as accessing a 
> sibling component of the same top-level couldn't possibly be so complex.  I 
> also found the necessity of modifying the JBuilder generated code so 
> significantly a bit distasteful.
> 
> Upon much reflection <pun intended>, I think that I've come up with a 
> simpler way that is less disruptive of the JBuilder code.  I was on the 
> right track when I tried to find the top-level frame containing my component 
> using the component's "getParent()" method.  In this regard, I think that 
> your comment on this approach ("Will not work, you are attempting to bypass 
> encapsulation rules") is not correct.  

Could be. I was under the assumption that you were using a class called 
Main that contained a reference to the class HexGame, which was not part 
of the Main class itself, therefore, you were attempting to access it 
out of scope. But if this was incorrect, then of course my assumption 
would be incorrect.

Of course without possessing the actual code, all one can do is guess :)
Technical Details
Message-ID: <45999757$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <459802c2$1@newsgroups.borland.com> <45984988$1@newsgroups.borland.com> <4599493d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,d29c312c94108c85
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 01 Jan 2007 18:21:39 -0500
From: "Paul Nichols [TeamB]" <"Paul Nichols [TeamB]">
Reply-To:  "Paul Nichols [TeamB]"
User-Agent: Thunderbird 1.5.0.8 (X11/20061117)
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: Accessing Components of top-level Frame?
References: <459802c2$1@newsgroups.borland.com> <45984988$1@newsgroups.borland.com> <4599493d@newsgroups.borland.com>
In-Reply-To: <4599493d@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 70.34.189.24
Message-ID: <45999757$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1167693655 70.34.189.24 (1 Jan 2007 15:20:55 -0800)
Lines: 28
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail