I created an own glasspane which makes a screendump of the underlying window. This screendump is shown as image of the input blocking glasspane. It work for all look and feels exceptionally seaglass.
private void createBackgroundImages()
{
// content image as screenshot (without menu)
bounds = oldContentPane.getBounds();
contentPaneImage = new BufferedImage(bounds.width, bounds.height, BufferedImage.TYPE_INT_RGB);
graphics = contentPaneImage.createGraphics();
oldContentPane.paintAll(graphics);
graphics.dispose();
// background image
bounds = parent.getBounds();
backgroundImage = new BufferedImage(bounds.width, bounds.height, BufferedImage.TYPE_INT_ARGB);
graphics = backgroundImage.createGraphics();
graphics.setColor(backgroundColor);
graphics.fillRect(0, 0, bounds.width, bounds.height);
graphics.dispose();
}
@Override
protected void paintComponent(Graphics g)
{
...
// screendump of underlying window
if (contentPaneImage != null)
{ g.drawImage(contentPaneImage, bounds.x, bounds.y, null);
}
// background
if (backgroundImage != null)
{ g.drawImage(backgroundImage, bounds.x, bounds.y, null);
}
...
}
Configuration:
JAVA 7
Windows 7