private void shapeWindow(JRootPane root) {
        root.getParent().addComponentListener(new ComponentAdapter() {
            /**
             * {@inheritDoc}
             */
            @Override
            public void componentResized(ComponentEvent e) {
                ShapeGenerator shapeGenerator = new ShapeGenerator();
                int width = e.getComponent().getWidth();
                int height = e.getComponent().getHeight();
                Shape s = shapeGenerator.createRoundRectangle(0, 0, width, height, CornerSize.FRAME_INNER_HIGHLIGHT,
                    CornerStyle.ROUNDED, CornerStyle.SQUARE, CornerStyle.SQUARE, CornerStyle.ROUNDED);
                WindowUtils.setWindowShape(window, s);
            }
        });
    }
private void shapeWindow ( JRootPane root ) { root . getParent ( ) . addComponentListener ( new ComponentAdapter ( ) { @ Override public void componentResized ( ComponentEvent e ) { ShapeGenerator shapeGenerator = new ShapeGenerator ( ) ; int width = e . getComponent ( ) . getWidth ( ) ; int height = e . getComponent ( ) . getHeight ( ) ; Shape s = shapeGenerator . createRoundRectangle ( 0 , 0 , width , height , CornerSize . FRAME_INNER_HIGHLIGHT , CornerStyle . ROUNDED , CornerStyle . SQUARE , CornerStyle . SQUARE , CornerStyle . ROUNDED ) ; WindowUtils . setWindowShape ( window , s ) ; } } ) ; }
@param root