Article View: borland.public.jbuilder.java.language
Article #15915Re: quiz on Inherittance ?
From: Jonathan
Date: Thu, 15 Apr 1999 00:00
Date: Thu, 15 Apr 1999 00:00
39 lines
1397 bytes
1397 bytes
what you can do is:
in the constructor of frame B , you can call super pasing across frame B
e.g. Super(FrameB)
and the constructor of frameA would be
FrameA(Frame aFrame){
.......
.......
}
now if you want you can set aFrame to a global variable in FrameA which can
then call methods on the Frame B e.g.
in FrameA
FrameB.getComponents(); // if there is such a method, or you could write
your own
good luck
Tor Iver Wilhelmsen wrote in message ...
>"Sohan Mendis" <sohan@maxtrak.com> writes:
>
>> class FrameA extends FrameB {
>>
>> }
>>
>> Is there a way FrameB can find about components on FrameA
>
>Well, if FrameB's constructor or other initialization method calls the
>superclass' constructor or initializaer, they will be added... but
>componentsaren't part of the class, but are contained in an instance
>of the class.
Technical Details
Message-ID:
<7f45le$hvp22@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7f40c6$hsq14@forums.borland.com> <ulnfuqqgi.fsf@sds.no>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,b7891a6519b6bc6 X-Google-Attributes: gidf74b3,public From: "Jonathan" <plaskowj@logica.com> Subject: Re: quiz on Inherittance ? Date: 1999/04/15 Message-ID: <7f45le$hvp22@forums.borland.com> X-Deja-AN: 466630898 References: <7f40c6$hsq14@forums.borland.com> <ulnfuqqgi.fsf@sds.no> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language