I am drawing circles behind my moving object with canvas. I dont have any problem with that . I initialized the canvas on mainpanel and the image is also a child of mainpanel. When my object is moving over the image , object is visible no problems but canvas drawen circles get lost until it moves out of image boundaries. I try to send the image back with sendtoback but that does not work.
How can i fix this ?
One possible option (if I understood it right) is:
mainPanel
--> imageview (a Panel child, as you have it now, with your moving image)
--> imageview2 (also as a Panel child, with the same dimensions as the panel, transparent color.)
and then
Canvas.initialize(imageview2) 'instead of initializing the canvas to the Panel. Now it will always be on top
I changed the image file so it is very thin and does not block my circles now. I will have too many circles so other solutions will not be so easy. Solved it for now . Thanks for help.