So I have many objects painting in the same paintComponent method so I can rotate them...but when i rotate one object it rotates all of them, is there a way to make different objects in one paint method?
Printable View
So I have many objects painting in the same paintComponent method so I can rotate them...but when i rotate one object it rotates all of them, is there a way to make different objects in one paint method?
I imagine that you're rotating them by applying an AffineTransform on the Graphics2D object? Two possible solutions come to mind: 1) reverse the transform after using it, or 2) create a copy of the Graphics2D object when needed, apply the transform on the copy, draw with the copy, and then dispose of the copy. I like option two the best.
Thanks will try.
Good luck!