Is this proper usage (and/or expectation) of a GlassPane?
Summing things up:
- I have a JFrame which contains a JPanel in its content pane
- I draw a grid in the JPanel in its paintComponent() method
I want to be able to draw over this grid without having to redraw the grid every time (this is mean for "line tool" type drawing, not freehand).
Is there anyway to use the setGlassPane method to achieve this?
I am picturing the glass pane component as a layer above everything else that can be drawn on without having to worry about (ie. redraw) whats under it. Is this a good assumption?
In my current implementation I have a glass pane set, although whenever i call glasspane.redraw() it ends up triggering a call to my jpanel.paintComponent() forcing me to redraw everything. Is there a way to avoid this and have some buffers automatically determine which pixels need to be redrawn under the glass?
Thanks
Message was edited by:
funkture

