package primitives.frames;
import java.awt.*;
/**
*Helper class  to lay components in a raw.
*Used by the Frames object as a container for the Label[] and DrawFrame[].
*By TextBox as a Container for buttons.
*@see Frames
*@see TextBox
*/
class ExPanel extends Panel{
	/**
	*lays the components array in a simple GridLayout inside this Panel.
	*@param components an array of Components to lay in a row.
	*/
	 ExPanel(Component[] components){
		setLayout(new GridLayout(1,components.length));
		for(int i=0;i<components.length;i++)
			add(components[i]);

	}
	 /**
	*lays the components array with the specified layout manager inside this Panel.
	*@param components an array of Components to lay in a row.
	*@param layout the layout manager to use.
	*/
	ExPanel(Component[] components,LayoutManager layout){
		setLayout(layout);
		for(int i=0;i<components.length;i++)
			add(components[i]);
	}
}
