I'm an experienced developer, just not in JAVA or OOP. I am stuck on a basic java fundamental.
I am building a small app that has a drawing area (JPanel) that when clicked will draw a colored shape on the panel where the user clicks. The shape and color of the object to be drawn is determined by radio and combo buttons on another panel.
What would be a very basic fundamental way to do this?
I start with a JFrame, add a left and right JPanel. The left panel has a mouselistener, the right has the attributes needed for the shape to be drawn.
I was able to get the drawing part to work but only with a hard coded shape built into it.
I would suggest adding reference to the said object by using as argument in action listener constructor method.
The Complete Running Example: