// columns in page header
Iterator iterator = fields.iterator();
int x = 0;
while(iterator.hasNext()) {
Field field = (Field)iterator.next();
JRDesignStaticText staticText = new JRDesignStaticText();
staticText.setX(x);
if(isSub) {
staticText.setY(20);
} else {
staticText.setY(5);
}
staticText.setWidth(field.getColumnWidth());
staticText.setHeight(15);
staticText.setForecolor(Color.white);
if(isSub) {
staticText.setBackcolor(new Color(0x99, 0x99, 0x99));
} else {
staticText.setBackcolor(new Color(0x33, 0x33, 0x33));
}
staticText.setMode(JRElement.MODE_OPAQUE);
staticText.setTextAlignment(JRTextElement.TEXT_ALIGN_RIGHT);
staticText.setFont(boldFont);
staticText.setText(field.getName());
band.addElement(staticText);
x += field.getColumnWidth();
}