How to render JPanel which contains the child components and that don’t exist as part of the visible containment hierarchy (i.e. panel has no parent)?
Method SwingUtilities.paintComponent() render only panel without the child components.
And how to handle mouse events by this panel?
have look at paintChildren, paintComponents, depends of code,
I’d woudn’t be to use
paintComponents()without important reason and good knowledge about Painting in Swing