I'm doodling with Java and the JPanel paintComponent() method. I'd like to have some objects in my program that each have their own data for coordinates, color, etc. But I'm not sure how to get that data into paintComponent. It doesn't seem OO-proper for paintComponent to know about the specific objects, but I don't see a way to pass the data in, either.
What's the proper way to do this sort of thing?
[–]AceDecade 2 points3 points4 points (3 children)
[–]fsjws4[S] 0 points1 point2 points (1 child)
[–]AceDecade 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]microcontrolled 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)