[1553] in java-interest

home help back first fref pref prev next nref lref last post

Re: The Window of an Applet??

daemon@ATHENA.MIT.EDU (Lin Huang)
Thu Sep 7 17:27:36 1995

To: Scott Treacy <S.P.Treacy@scotborders.co.uk>
Date: Thu, 07 Sep 95 09:33:10 -0500
From: Lin Huang <linh@connectsoft.com>
CC: java-interest <java-interest@java.sun.com>

Hi Scott:

I don't get much out your scroll problem as you mentioned. What I did was
creating a HTML page, in the middle of the page, I embeded a applet. (Yes,
you need to get item.x, and item.y in your Applet's start() method which is
when the document gets visited to pass to the windows etc you need to create
.)  What I didn't experienced any scroll related problem is in the init() of
the Applet, I have set the Applet's width and height, and in the start()
method, which I created bunch of windows etc, I used applet's height as the
reference to created base window and its children....and the page behavior
is normal. 

Lin
-------- REPLY, Original message follows --------

> Date: Thursday, 07-Sep-95 11:58 AM
> 
> From: Scott Treacy             \ Internet:    (s.p.treacy@scotborders.co.
uk)
> To:   java-interest            \ Internet:    (java-interest@java.sun.com)
> 
> Subject: Re: The Window of an Applet??
> 
> >Hi guys,
> >
> >I tried to do that, but (item.x,item.y) still refers to the origin of the

> >html document rather than the applet. As a result, all my TextAreas are 
> >clustered at the top-left corner of the html document, even though they 
> >are from different applets within the html document.
> >
> >> Hi Henry:
> >> 
> >> You can try to use Applet.item.parent as the parent to construct the
> >> TextAreas, Windows etc, and using item.x and item.y (the origin of
Applet)
> >> as the start point to position your objects.
> >> 
> >> Lin
> 
> I had problems with this too... I finally sorted it out though;
> 
> 1/      the referance is; this.item.x / y
> 2/      It must be called from within the applet <My Applet> class NOT
> <Other>                 class used by <My Applet>. 
> 3/      To do that you must pass 'this' to your <other> class as its
parent.
> 4/      That means the referance is now; parent.item.x / y
> 
> What I have not sorted out yet, is the fact that this will not take into
> account use of the browser scroll bar. There are variables scrollX / Y in
the
> browser displayItemWindow but these are protected. There is a getScrollY
method
> but I have not looked at it yet.
> 
> The other problem with this is the co-ord's returned from the mouse
pointer
> have an origin with the applet and these take scroll into account.
> 
> A real mess but from talking to Jonathan Payne he helped me sort it out
and has
> told me it will all be sorted out with the beta awt. The other thing to
bare in
> mind is any solution to this using an alpha, will be proprietry.
> 
> Regards
> Scott
> 
> Scott P. Treacy - Java Development Team, TweedNet, Calligrafix
>        aka        Email: S.P.Treacy@elgeebar.scotborders.co.uk
>      Elgeebar     Tel: +44 (0) 1896 870490  Fax: +44 (0) 1896 757965
>    #question:UN   Smail: 17 Park Villa, Walkerburn, Borders.Scotland. EH43
4AN.
> 
> -
> Note to Sun employees: this is an EXTERNAL mailing list!
> Info: send 'help' to java-interest-request@java.sun.com
> 

-------- REPLY, End of original message --------


-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post