create an transparent rectangle over blurred background in jframe
I am having problem in creating an transparent rectangle over blurred background. I am trying to do this task on glasspane . Here is my code snippet. void createBlur() { alpha = 1.0f; JRootPane root = SwingUtilities.getRootPane(jf); blurBuffer = GraphicsUtilities.createCompatibleImage(jf.getWidth(), jf.getHeight()); Graphics2D g2d = blurBuffer.createGraphics(); root.paint(g2d); g2d.dispose(); backBuffer = blurBuffer; blurBuffer = GraphicsUtilities.createThumbnailFast(blurBuffer, jf.getWidth() / 2); blurBuffer = new GaussianBlurFilter(5).filter(blurBuffer, null); } where, backBuffer and