I am trying to draw shapes on canvas using mouse events in JCanvas. I am trying to implement it by creating a temporary canvas to draw shapes. My question here is can we implement temporary canvas in JCanvas? I am not getting any idea of how to draw shapes on canvas in JCanvas using mouseevents. Can you please give a basic example of using mouse events to draw shapes in jcanvas.
Thanks in advance.