[308] in java-interest
Re: access to container or window
daemon@ATHENA.MIT.EDU (Lein Ton)
Wed Jun 14 10:14:32 1995
Date: Wed, 14 Jun 1995 09:49:36 -0400
From: ton@cc.gatech.edu (Lein Ton)
To: rizzotti.sven@ch.swissbank.com
Cc: java-interest@java.sun.com
----- Begin Included Message -----
A lot of the classes like List, TextField etc. need a container which can be
a form or a window. where do I get this variable from inside my applet
subclass ?
__Sven
-
----- End Included Message -----
Hello Sven,
I don't know if it's a good idea to do it, but you can always access the
applet's item.parent, which is a DisplayItemWindow. so whitin an applet you
could address this window with this.item.parent .
I experienced some trouble with that using hot java:
- if you open a window in this window, it doesn't scroll (while a button does).
- you must explicitly get rid of the windows and things you create in the stop
(or destroy, both?) method using "myWindow.dispose()".
- If you've created more than one object, you should dispose of them in the
reverse order you created them, otherwise only the first is deleted.
btw, if you found a solution to this already, I'd be happy to get it.
have fun,
Lein Ton
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com