jlayeredpane

JLayeredPane and painting

瘦欲@ 提交于 2019-11-26 11:32:14
问题 I am writing an application which has a JLayeredPane (call it layers) containing two JPanels in different layers. I override the paintComponent method of the JPanel at the bottom (call it grid_panel) so it paints a grid, and the the paintComponent method of the one at the top (call it circuit_panel) so it paints a circuit. Here\'s a summary of the structure: layers - |-circuit_panel (on top) |-grid_panel (at bottom) I want the grid_panel to stay static, ie, not to do any repaint (except the