contentPane.setLayout(gbLayout);
} else
{
gbLayout = (GridBagLayout) contentPane.getLayout();
}
DomNode layoutNode = getFirstElementByTag(element, "layout");
if (layoutNode != null)
{
int cols = Integer.parseInt(layoutNode.getAttribute("cols"));
int rows = Integer.parseInt(layoutNode.getAttribute("rows"));
List cells = getChildrenByTag(layoutNode, "cell");
Map toBeAdded = new LinkedHashMap();
for (int i = 0; i < cells.size(); i++)
{
DomNode cellNode = (DomNode) cells.get(i);
List childElements = getComponentNodes(cellNode);
if (childElements.size() == 0)
{
//just a padding cell
} else if (childElements.size() == 1)
{
DomNode comNode = (DomNode) childElements.get(0);
Object childCom = rootHandler.handle(contentPane, comNode);
GridBagConstraints cons = new GridBagConstraints();
cons.fill = GridBagConstraints.BOTH;
int row = Integer.parseInt(cellNode.getAttribute("row"));
int col = Integer.parseInt(cellNode.getAttribute("col"));