Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jsmwoolf

macrumors regular
Original poster
Aug 17, 2011
123
0
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.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.