public NightlyBuildDialog(JFrame parent) {

    super(parent, true);

    this.setTitle("Warning !!!");
    this.setLayout(new BorderLayout());
    this.add(new NightlyBuildWarning(), BorderLayout.CENTER);

    show_option_checkbox.setSelected(!_pref.isNightlyBuildWarning());

    GridBagLayout grid_bag_layout = new GridBagLayout();
    bottom_panel.setPreferredSize(new java.awt.Dimension(399, 57));
    grid_bag_layout.rowWeights = new double[] {0.1};
    grid_bag_layout.rowHeights = new int[] {7};
    grid_bag_layout.columnWeights = new double[] {0.0, 0.0, 0.1, 0.0};
    grid_bag_layout.columnWidths = new int[] {231, 44, 7, 7};
    bottom_panel.setLayout(grid_bag_layout);
    bottom_panel.add(
        show_option_checkbox,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0),
            0,
            0));
    bottom_panel.add(
        ok_button,
        new GridBagConstraints(
            2,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    this.add(bottom_panel, BorderLayout.SOUTH);
    this.setSize(450, 340);
    ok_button.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent event) {
            if (show_option_checkbox.isSelected()) _pref.setNightlyBuildWarning(false);
            setVisible(false);
          }
        });
  }
/**
 * Created on Sep 25, 2008
 *
 * @author javajox
 * @version $Revision: 1.1 $ Last changed by $Author: javajox $ on $Date: 2008/10/16 17:35:11 $
 */
public class NightlyBuildDialog extends JDialog {

  JPanel bottom_panel = new JPanel();
  JCheckBox show_option_checkbox = new JCheckBox("Don't show this window again");
  JButton ok_button = new JButton("OK");

  // JMuleCore _core = JMuleCoreFactory.getSingleton();
  SwingPreferences _pref = SwingPreferences.getSingleton();

  public NightlyBuildDialog(JFrame parent) {

    super(parent, true);

    this.setTitle("Warning !!!");
    this.setLayout(new BorderLayout());
    this.add(new NightlyBuildWarning(), BorderLayout.CENTER);

    show_option_checkbox.setSelected(!_pref.isNightlyBuildWarning());

    GridBagLayout grid_bag_layout = new GridBagLayout();
    bottom_panel.setPreferredSize(new java.awt.Dimension(399, 57));
    grid_bag_layout.rowWeights = new double[] {0.1};
    grid_bag_layout.rowHeights = new int[] {7};
    grid_bag_layout.columnWeights = new double[] {0.0, 0.0, 0.1, 0.0};
    grid_bag_layout.columnWidths = new int[] {231, 44, 7, 7};
    bottom_panel.setLayout(grid_bag_layout);
    bottom_panel.add(
        show_option_checkbox,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0),
            0,
            0));
    bottom_panel.add(
        ok_button,
        new GridBagConstraints(
            2,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    this.add(bottom_panel, BorderLayout.SOUTH);
    this.setSize(450, 340);
    ok_button.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent event) {
            if (show_option_checkbox.isSelected()) _pref.setNightlyBuildWarning(false);
            setVisible(false);
          }
        });
  }
}