public void setUndecorated (boolean undecorated)

Disables or enables decorations for this dialog.

This method can only be called while the dialog is not displayable. To make this dialog 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 dialog decorations are to be enabled; false if dialog decorations are to be enabled

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

See also:
isUndecorated, Component.isDisplayable, Window.getShape, Window.getOpacity, Window.getBackground

Since:  1.4