--- old/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java 2015-02-25 14:01:05.250231400 +0300 +++ new/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java 2015-02-25 14:01:04.791185500 +0300 @@ -616,7 +616,12 @@ if (XPStyle.getXP() == null) { return; } - skinPainter.paint(null, g, dx, dy, dw, dh, this, state); + if (component != null) { + skinPainter.paint(null, g, dx, dy, dw, dh, this, state, + component.isOpaque()); + } else { + skinPainter.paint(null, g, dx, dy, dw, dh, this, state); + } } /** Paint a skin at a defined position and size @@ -673,10 +678,12 @@ DataBufferInt dbi = (DataBufferInt)raster.getDataBuffer(); // Note that stealData() requires a markDirty() afterwards // since we modify the data in it. - ThemeReader.paintBackground(SunWritableRaster.stealData(dbi, 0), - part.getControlName(c), part.getValue(), - State.getValue(part, state), - 0, 0, w, h, w); + if (c == null || c.isOpaque() || state == State.PRESSED) { + ThemeReader.paintBackground(SunWritableRaster.stealData(dbi, 0), + part.getControlName(c), part.getValue(), + State.getValue(part, state), + 0, 0, w, h, w); + } SunWritableRaster.markDirty(dbi); }