public WizardPage(int button_flags) {   setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));  Box pageBox = Box.createVerticalBox(); contentPane = new JPanel();   add(contentPane);    add(Box.createGlue());   JSeparator js = new JSeparator(); js.setAlignmentY(Component.BOTTOM_ALIGNMENT); add(js); add(Box.createRigidArea(new Dimension(10,10)));   buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS)); buttonPanel.setName("buttonPanel"); buttonPanel.add(Box.createHorizontalGlue()); add(buttonPanel);  if (button_flags == 0) {  return; }  if ((button_flags & PREVIOUS) != 0) { previousAction = new AbstractAction(LangTool.getString("wiz.previous")) { public void actionPerformed(ActionEvent e) { } };  previousButton = new JButton(previousAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(previousButton); }  if ((button_flags & NEXT) != 0) { nextAction = new AbstractAction(LangTool.getString("wiz.next")) { public void actionPerformed(ActionEvent e) { } };  nextButton = new JButton(nextAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(nextButton); }  if ((button_flags & FINISH) != 0) { finishAction = new AbstractAction(LangTool.getString("wiz.finish")) { public void actionPerformed(ActionEvent e) { } }; finishButton = new JButton(finishAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(finishButton); }  if ((button_flags & CANCEL) != 0) { cancelAction = new AbstractAction(LangTool.getString("wiz.cancel")) { public void actionPerformed(ActionEvent e) { } };  cancelButton = new JButton(cancelAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(cancelButton); buttonPanel.add(Box.createRigidArea(new Dimension(MARGIN,0))); } if ((button_flags & HELP) != 0) { helpAction = new AbstractAction(LangTool.getString("wiz.help")) { public void actionPerformed(ActionEvent e) { } };  helpButton = new JButton(helpAction); }
public WizardPage() { this(ALL);
   public WizardPage(int button_flags) {      // set layout as a vertical column      setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));//      setLayout(new BorderLayout());      Box pageBox = Box.createVerticalBox();      contentPane = new JPanel();      // add the pages contentpane to our wizard page      add(contentPane);      // lets add some glue here but it still does not stop the separator from      //  moving up and down.      add(Box.createGlue());      // create the separator between the panels      JSeparator js = new JSeparator();      js.setAlignmentY(Component.BOTTOM_ALIGNMENT);      add(js);      add(Box.createRigidArea(new Dimension(10,10)));      // create the box for the buttons with an x-axis      buttonPanel = new JPanel();      buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS));      buttonPanel.setName("buttonPanel");      buttonPanel.add(Box.createHorizontalGlue());      add(buttonPanel);      if (button_flags == 0) {         // no buttons to add :-(         return;      }      if ((button_flags & PREVIOUS) != 0) {         previousAction = new AbstractAction(LangTool.getString("wiz.previous")) {               public void actionPerformed(ActionEvent e) {               }           };         previousButton = new JButton(previousAction);         buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0)));         buttonPanel.add(previousButton);      }      if ((button_flags & NEXT) != 0) {         nextAction = new AbstractAction(LangTool.getString("wiz.next")) {               public void actionPerformed(ActionEvent e) {               }           };         nextButton = new JButton(nextAction);         buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0)));         buttonPanel.add(nextButton);      }      if ((button_flags & FINISH) != 0) {         finishAction = new AbstractAction(LangTool.getString("wiz.finish")) {               public void actionPerformed(ActionEvent e) {               }           };         finishButton = new JButton(finishAction);         buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0)));         buttonPanel.add(finishButton);      }      if ((button_flags & CANCEL) != 0) {         cancelAction = new AbstractAction(LangTool.getString("wiz.cancel")) {               public void actionPerformed(ActionEvent e) {               }           };         cancelButton = new JButton(cancelAction);         buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0)));         buttonPanel.add(cancelButton);         buttonPanel.add(Box.createRigidArea(new Dimension(MARGIN,0)));      }      if ((button_flags & HELP) != 0) {         helpAction = new AbstractAction(LangTool.getString("wiz.help")) {               public void actionPerformed(ActionEvent e) {               }           };         helpButton = new JButton(helpAction);      }   }