@@ -0,0 +1,2193 @@
+package de.craften.ui.swingmaterial;%0A%0Aimport javax.swing.*;%0Aimport javax.swing.border.EmptyBorder;%0Aimport java.awt.*;%0Aimport java.awt.event.ComponentAdapter;%0Aimport java.awt.event.ComponentEvent;%0Aimport java.awt.geom.RoundRectangle2D;%0A%0A/**%0A * A window with Material shadow.%0A */%0Apublic class MaterialWindow extends JFrame %7B%0A    public MaterialWindow() %7B%0A        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();%0A        if (ge.getDefaultScreenDevice().isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency.PERPIXEL_TRANSLUCENT)) %7B%0A            setUndecorated(true);%0A            setBackground(new Color(255, 255, 255, 0));%0A            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A            setContentPane(new ShadowPane());%0A            getRootPane().putClientProperty(%22Window.shadow%22, Boolean.FALSE);%0A            getRootPane().setWindowDecorationStyle(JRootPane.NONE);%0A            addComponentListener(new ComponentAdapter() %7B%0A                @Override%0A                public void componentResized(ComponentEvent componentEvent) %7B%0A                    setShape(new RoundRectangle2D.Float(0, 0, getWidth(), getHeight(), 3, 3));%0A                %7D%0A            %7D);%0A        %7D%0A    %7D%0A%0A    private class ShadowPane extends JPanel %7B%0A        ShadowPane() %7B%0A            setLayout(new BorderLayout());%0A            setOpaque(false);%0A            setBorder(new EmptyBorder(MaterialShadow.OFFSET_TOP, MaterialShadow.OFFSET_LEFT, MaterialShadow.OFFSET_BOTTOM, MaterialShadow.OFFSET_RIGHT));%0A        %7D%0A%0A        @Override%0A        protected void paintComponent(Graphics g) %7B%0A            Graphics2D g2d = (Graphics2D) g;%0A            g.clearRect(0, 0, getWidth(), getHeight());%0A            g2d.setComposite(AlphaComposite.SrcOver);%0A            g2d.drawImage(MaterialShadow.renderShadow(getWidth(), getHeight(), 2), 0, 0, null);%0A%0A            g.setClip(new RoundRectangle2D.Float(MaterialShadow.OFFSET_LEFT, MaterialShadow.OFFSET_TOP,%0A                    getWidth() - MaterialShadow.OFFSET_LEFT - MaterialShadow.OFFSET_RIGHT,%0A                    getHeight() - MaterialShadow.OFFSET_TOP - MaterialShadow.OFFSET_BOTTOM, 3, 3));%0A            super.paintComponent(g);%0A        %7D%0A    %7D%0A%7D

Add a Material window.