public void maximiseComponent(Component component){
  if (component == null) {
    throw new IllegalArgumentException("Parameter component must not be null.");
  }
  if (maximisedComponent != null) {
    return;
  }
  maximisedComponent=component;
  parentMaximisedComponent=component.getParent();
  containerChild=container.getComponent(0);
  parentMaximisedComponent.remove(component);
  container.remove(containerChild);
  container.add(component);
  container.validate();
}

public void maximiseComponent ( Component component ) { if ( component == null ) { throw new IllegalArgumentException ( "Parameter component must not be null." ) ; } if ( maximisedComponent != null ) { return ; } maximisedComponent = component ; parentMaximisedComponent = component . getParent ( ) ; containerChild = container . getComponent ( 0 ) ; parentMaximisedComponent . remove ( component ) ; container . remove ( containerChild ) ; container . add ( component ) ; container . validate ( ) ; }
maximises the given component , to occupy the whole container . < p > the maximisation is done by adding the component directly to the container . if another component is already maximised it does nothing .
