PDA

View Full Version : Java: Animation




jsmwoolf
Feb 17, 2012, 10:00 PM
I'm trying to improve my Java skills by focusing on different areas such as animation. In order to make a Bejeweled-like animation(with pieces fall down and moving to whatever direction the mouse goes), what's the best way to tackle this kind of animation? I was thinking of using a JPanel as the drawing class and using JComponents to control the pieces to move to a specific spot, but I don't know if it would be practical although in my gut it probably is. However using JComponents alone would probably not work because the piece would simply draw outside of the view, thus making it impossible to drop to the next JComponent so I'm at a standstill.

EDIT: I might have figured it out on my own using a third class that holds specific information about the piece. I should have searched better first. Sorry about that.