I've made some progress on this using a Panel.
I haven't figured out how to make the panel update the x and y coordinates and redraw when the button is clicked
I haven't figured out how to make the panel update the x and y coordinates and redraw when the button is clicked
Or do I need to create a new method in DrawingPanel to move the ball?
When I put the doublebuffering back
Rob Camick wrote:
Or do I need to create a new method in DrawingPanel to move the ball?
Yes, that would be the better approach.
Rob Camick wrote:This is your current code:
So the method would be:
And your painting code would be:
What is the proper way to replace the drawingPanel component in my layout with another component?
Get me the mayor's office! I need to tell him about this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|