Component xpanelc1 = (Component)compfactory.addComponent( XPage.PANEL, 10, 10, 160, 100, null, null );
Component xpanelc2 = (Component)compfactory.addComponent( XPage.PANEL, 10, 160, 360, 160, null, null );
/* First child panel */
compfactory.setParentComponent(xpanelc1);
XLabel lbl1 = (XLabel)compfactory.addComponent( XPage.LABEL, 10, 2, 80, 25, "test 1", null );
XLabel lbl2 = (XLabel)compfactory.addComponent( XPage.LABEL, 10, 30, 80, 25, "test 2", null );
/* Second child panel */
compfactory.setParentComponent(xpanelc2);
XLabel lbl3 = (XLabel)compfactory.addComponent( XPage.LABEL, 10, 2, 120, 50, "this is a piece of wrapping text", "bold" );
XLabel lbl4 = (XLabel)compfactory.addComponent( XPage.LABEL, 10, 90, 120, 20, "test 4", "bold" );
/* Add a generic component */
Button b = (Button)compfactory.addComponent( XPage.BUTTON, 120, 70, 150, 35, null );
b.setActionCommand("calculate");
b.setLabel("Test button");