public void setUndecorated (boolean undecorated)

Disables or enables decorations for this frame.

This method can only be called while the frame is not displayable. To make this frame decorated, it must be opaque and have the default shape, otherwise the IllegalComponentStateException will be thrown. Refer to Window.setShape, Window.setOpacity and Window.setBackground for details

Parameters:
undecorated    true if no frame decorations are to be enabled; false if frame decorations are to be enabled

Exceptions:
IllegalComponentStateException    if the frame is displayable
IllegalComponentStateException    if undecorated is false, and this frame does not have the default shape
IllegalComponentStateException    if undecorated is false, and this frame opacity is less than 1.0f
IllegalComponentStateException    if undecorated is false, and the alpha value of this frame background color is less than 1.0f

See also:
isUndecorated, Component.isDisplayable, Window.getShape, Window.getOpacity, Window.getBackground, javax.swing.JFrame.setDefaultLookAndFeelDecorated(boolean)

Since:  1.4