How can I paint the grid itself (e.g. grid lines) on a Figure, which has grid layout. I think i need to paint it in another layer, but i can not figure out what exactly to do, to paint 'above' the layer with grid layout.
How can I paint the grid itself (e.g. grid lines) on a Figure, which has grid layout. I think i need to paint it in another layer, but i can not figure out what exactly to do, to paint 'above' the layer with grid layout.
You can just override the
paint(Graphics)
method of your figure with the grid layout:Everything you paint where the comment is will appear above the figure and its children.