JPanel has white background when painted in a buffered image
boomahMar 7 2008 — edited Mar 7 2008Hi people. Please help me before I go nuts!
I've got a program that creates some components, creates a buffered image, draws the components onto the buffered image and then draws the buffered image somewhere on screen.
This all works fine apart from one really annoying problem. When I'm drawing a JPanel, the background (or the place where it doesn't contain any other components) is white!
If I use a JComponent it all works fine. I can see the component underneath, however, I need to draw some components that I don't have control over and they are based on a JPanel.
I set the JPanel's setOpaque to false but still the background is white.
This is driving me crazy as I've tried lots of different techniques to get this to work but it just won't.
Please Help,
Paul.