pageHeightField.getDocument().addDocumentListener(revalidateListener);
pageWidthField = new JTextField();
pageWidthField.setColumns(5);
pageWidthField.getDocument().addDocumentListener(revalidateListener);
landscapeModeBox = new JCheckBox();
landscapeModeBox.addActionListener(new OrientationChangeListener());
portraitModeBox = new JCheckBox();
portraitModeBox.addActionListener(new OrientationChangeListener());
preDefinedPageSizeBox = new JCheckBox();
preDefinedPageSizeBox.addChangeListener(new PageSizeCheckBoxSelectionAction());
userDefinedPageSizeBox = new JCheckBox();
userDefinedPageSizeBox.addChangeListener(new PageSizeCheckBoxSelectionAction());
final ButtonGroup pageSizeGroup = new ButtonGroup();
pageSizeGroup.add(preDefinedPageSizeBox);
pageSizeGroup.add(userDefinedPageSizeBox);