[2712] in java-interest

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

Re: java-interest-digest V1 #216

daemon@ATHENA.MIT.EDU (Java Mailbox)
Wed Oct 11 13:47:07 1995

Date: Wed, 11 Oct 1995 11:35:35 +1030 (???)
From: Java Mailbox <java@imi.imicro.com>
To: java-interest@java.sun.com
In-Reply-To: <199510102237.PAA28727@java.sun.com>


Sorry to ask a stupid question, Java gurus, nevertheless, I forge ahead:

I'm trying to write a simple applet that has objects which know how to draw
themselves.  Eg, each object would have its own repaint() method to redraw
that object, maybe at a new location.  What is the simplest/correct way to
do this? 

I have tried various permutations of an object myObject which has a static
Graphics variable which would be initialized to the Graphics context of my
Applet. 

a) I'm not sure how to initialize such an object from 
Applet.init().  What points to the current window/Graphics context?

b) Even when I tried this from Applet.paint(), I got unanticipated trouble:

javac compiles my file without error, but when I call it (from HTML, of 
course), the Applet appears to simply stop at the point where I call my 
initializer method within myObject.  What is happening? 

PS:  Using WinNT java port.

thanks, 

matt benjamin
matt@imicro.com
-
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