// IO Panel
Panel topPanel = new Panel();
topPanel.setLayout(new FlowLayout());
CheckboxGroup group1= new CheckboxGroup();
// Set up the controls for each calendar we're demonstrating
for (int i = 0; i < calendars.length; i++)
{
Label label = new Label(calendars[i].name, Label.RIGHT);
label.setFont(DemoUtility.labelFont);
topPanel.add(label);
topPanel.add(calendars[i].text);
final int j = i;
calendars[i].text.addActionListener( new ActionListener() {
public void actionPerformed(ActionEvent e) {
textChanged(j);
}
} );
calendars[i].rollAdd.setCheckboxGroup(group1);
topPanel.add(calendars[i].rollAdd);
}
calendars[0].rollAdd.setState(true); // Make the first one selected
Label label4=new Label("Pattern", Label.RIGHT);
label4.setFont(DemoUtility.labelFont);
topPanel.add(label4);
patternText=new TextField(FIELD_COLUMNS);
patternText.setFont(DemoUtility.editFont);
topPanel.add(patternText);
topPanel.add(new Label(""));
DemoUtility.fixGrid(topPanel,3);
add(topPanel);
add(DemoUtility.createSpacer());
// ROLL / ADD
Panel rollAddPanel=new Panel();
{
rollAddPanel.setLayout(new FlowLayout());
Panel rollAddBoxes = new Panel();
{
rollAddBoxes.setLayout(new GridLayout(2,1));
CheckboxGroup group2= new CheckboxGroup();
getRoll = new Checkbox("Roll",group2, false);
getAdd = new Checkbox("Add",group2, true);
rollAddBoxes.add(getRoll);
rollAddBoxes.add(getAdd);