What does the super.paintComponent(g) do?
843785Jan 11 2009 — edited Jan 11 2009When I am extending the JPanel I have to super.paintComponent(g) - I know that it is required because a panel like JPanel is opaque but what is it really used for? I don't understand that the code itself paints the panel with the background colour - how does it lose it in the first place? Is there a method in JComponent that the JPanel inherits from JComponent class that makes the JPanel opaque but loses it? If this is true does it lose it as we're using the paintComponent class or as we're extending the JPanel?
Any help is appreciated...
Cheers
Edited by: bastones_ on Jan 11, 2009 11:46 AM
Edited by: bastones_ on Jan 11, 2009 11:54 AM