In Swing JPanel said to be opaque, what does that mean?
Also how JPanel VS JComponent compared in relation to opaque?
Please explain if possible in simple te
Opaque has a very specific meaning in Swing - it means that the component fully paints the full area within its bounds (see the setOpaque javadoc)
This is used primarily to determine whether it is necessary to repaint components behind the current component.
If you are creating your own JComponent and setOpaque to true but do not honour the contract (i.e. you do not draw the full area within the bounds despite claiming to be opaque) then you may get unexpected results due to the background not being redrawn.