private void enableActions(){
  restoreAction.setEnabled(frame.isMaximum() || frame.isIcon());
  maximizeAction.setEnabled((frame.isMaximizable() && !frame.isMaximum() && !frame.isIcon()) || (frame.isMaximizable() && frame.isIcon()));
  iconifyAction.setEnabled(frame.isIconifiable() && !frame.isIcon());
  closeAction.setEnabled(frame.isClosable());
  sizeAction.setEnabled(false);
  moveAction.setEnabled(false);
}

private void enableActions ( ) { restoreAction . setEnabled ( frame . isMaximum ( ) || frame . isIcon ( ) ) ; maximizeAction . setEnabled ( ( frame . isMaximizable ( ) && ! frame . isMaximum ( ) && ! frame . isIcon ( ) ) || ( frame . isMaximizable ( ) && frame . isIcon ( ) ) ) ; iconifyAction . setEnabled ( frame . isIconifiable ( ) && ! frame . isIcon ( ) ) ; closeAction . setEnabled ( frame . isClosable ( ) ) ; sizeAction . setEnabled ( false ) ; moveAction . setEnabled ( false ) ; }
set the enable / disabled state for the buttons .
