header.setName("Continent-Group-Header");
LabelElementFactory factory = new LabelElementFactory();
factory.setName("Continent-Group-Header-Label");
factory.setAbsolutePosition(new Point2D.Float(0, 1));
factory.setMinimumSize(new FloatDimension(76, 9));
factory.setHorizontalAlignment(ElementAlignment.LEFT);
factory.setVerticalAlignment(ElementAlignment.MIDDLE);
factory.setText("CONTINENT:");
header.addElement(factory.createElement());
final TextFieldElementFactory tfactory = new TextFieldElementFactory();
tfactory.setName("Continent-Group-Header Continent Element");
tfactory.setAbsolutePosition(new Point2D.Float(96, 1));
tfactory.setMinimumSize(new FloatDimension(76, 9));
tfactory.setHorizontalAlignment(ElementAlignment.LEFT);
tfactory.setVerticalAlignment(ElementAlignment.MIDDLE);
tfactory.setNullString("<null>");
tfactory.setFieldname("Continent");
header.addElement(tfactory.createElement());
header.addElement(HorizontalLineElementFactory.createHorizontalLine(12, null, new BasicStroke(0.5f)));
continentGroup.setHeader(header);
final GroupFooter footer = new GroupFooter();
footer.setName("Continent-Group-Footer");
footer.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(20));
header.getStyle().setStyleProperty(TextStyleKeys.FONT, "Monospaced");
header.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
header.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.TRUE);
factory = new LabelElementFactory();
factory.setName("Continent-Group-Footer Label");
factory.setAbsolutePosition(new Point2D.Float(0, 0));
factory.setMinimumSize(new FloatDimension(100, 12));
factory.setHorizontalAlignment(ElementAlignment.LEFT);
factory.setVerticalAlignment(ElementAlignment.MIDDLE);
factory.setText("Population:");
footer.addElement(factory.createElement());
final NumberFieldElementFactory nfactory = new NumberFieldElementFactory();
nfactory.setName("Continent-Group-Footer Sum");
nfactory.setAbsolutePosition(new Point2D.Float(260, 0));
nfactory.setMinimumSize(new FloatDimension(76, 12));
nfactory.setHorizontalAlignment(ElementAlignment.LEFT);
nfactory.setVerticalAlignment(ElementAlignment.MIDDLE);
nfactory.setNullString("<null>");
nfactory.setFieldname("sum");
nfactory.setFormatString("#,##0");