enableActions();
Dimension size = c.getSize();
    public void layoutContainer(Container c)    {      enableActions();      Insets insets = c.getInsets();      int width = c.getBounds().width - insets.left - insets.right;      int height = c.getBounds().height - insets.top - insets.bottom;      // MenuBar is always present and located at the top left corner.      Dimension menupref = menuBar.getPreferredSize();      menuBar.setBounds(insets.left, insets.top, menupref.width, height);      int loc = width + insets.left;      Insets i = closeButton.getInsets();      Dimension prefs = new Dimension(iconSize + i.left + i.right,                                      iconSize + i.top + i.bottom);      int top = insets.top + (height - prefs.height) / 2;      if (closeAction.isEnabled())        {	  loc -= prefs.width;	  closeButton.setVisible(true);	  closeButton.setBounds(loc, top, prefs.width, prefs.height);        }      else	closeButton.setVisible(false);      if (maximizeAction.isEnabled())        {	  loc -= prefs.width;	  maxButton.setVisible(true);	  maxButton.setBounds(loc, top, prefs.width, prefs.height);        }      else	maxButton.setVisible(false);      if (iconifyAction.isEnabled())        {	  loc -= prefs.width;	  iconButton.setVisible(true);	  iconButton.setBounds(loc, top, prefs.width, prefs.height);        }      else	iconButton.setVisible(false);      if (title != null)	title.setBounds(insets.left + menupref.width, insets.top,	                loc - menupref.width - insets.left, height);    }