Though new to Java, I am creating a program using 2d graphics.  The only 
problem I'm having is:

In the main class, I defined a JFrame.
Then I called my SetupCanvas class with:
   f.add(new SetupCanvas(c), BorderLayout.CENTER);

In SetupCanvas (which extends Canvas), I draw stuff on the screen using the 
paint method.  Works fine.

I want to do animation drawing on the screen from various other classes but 
don't understand how to communicate to these classes what the JFrame name is 
(f) or if I should use the canvas from SetupCanvas(c), or something else.

The problem is, when I call, for instance, my AnimationOne class, how do I 
invoke the paint method present in that class?  If I code a repaint(), it needs 
a JFrame or Canvas name prefix, such as, f.repaint().  How do I pass to 
AnimationOne what it needs for the repaint command?

Thanks.
[Message sent by forum member 'plurald' (plurald)]

http://forums.java.net/jive/thread.jspa?messageID=99417

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to