--- "Benjamin C. Ashpole" <[EMAIL PROTECTED]> wrote:
> JAVA2D-INTEREST Digest - 11 Apr 2000 to 12 Apr 2000
> (#2000-24)Hello everyone,
> I'm starting to learn graphics with the Java 1.3
> Beta, Swing, and Java2D. Could someone please tell
> me if it still makes sense to derive classes from
> java.awt.Canvas to make animated surfaces that I can
> add to a layout manager?
For Swing, use JComponent instead. Canvas is bad for
Swing use because it is heavyweight.
> Also, lets say I have some animation going that
> is being refreshed with the graphics context of the
> surrounding component (the component is having its
> paint method called repeatedly). First, does it
> make sense to have the paint method called for this?
> (I'm using a Timer by way of actionPerformed for
> this.)
It's usually better to have the timer call repaint(),
but there are exceptions.
> Second, what if its set up like this and the
> user pulls down menu over the animation. Wouldn't
> the animation paint over the menu (since the
> component below the menu is being redrawn, not the
> whole program be redrawn)? If so, what's the best
> way to handle this? Repaint everything, everytime?!
>
The amimation should be clipped around the menu. So,
there should be no problem with this.
> Thanks in advance!!
> Ben
>
Sincerely,
Thorn Green
__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com
===========================================================================
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".