Example usage for javax.swing WindowConstants EXIT_ON_CLOSE

List of usage examples for javax.swing WindowConstants EXIT_ON_CLOSE

Introduction

In this page you can find the example usage for javax.swing WindowConstants EXIT_ON_CLOSE.

Prototype

int EXIT_ON_CLOSE

To view the source code for javax.swing WindowConstants EXIT_ON_CLOSE.

Click Source Link

Document

The exit application default window close operation.

Usage

From source file:Hyperbole.java

public Hyperbole(String applicationTitle, String chartTitle) {
    super(applicationTitle);
    setSize(500, 270);/*from   w  ww  .  j a v  a2  s. c  o  m*/
    setVisible(true);
    setFocusable(true);
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

    manager = new ScriptEngineManager();
    engine = manager.getEngineByName("js");

    eq = new JButton("Add equation");

    XYDataset dataset = createDataset();
    JFreeChart chart = createChart(dataset, chartTitle);
    ChartPanel chartPanel = new ChartPanel(chart);

    JPanel panel1 = new JPanel();
    panel1.add(chartPanel);
    JPanel panel2 = new JPanel();
    panel2.add(eq);
    JPanel container = new JPanel();
    container.add(panel1);
    container.add(panel2);
    getContentPane().add(container);

    eq.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            clean();
            draw(JOptionPane.showInputDialog("New equation"));
        }
    });

    pack();
}

From source file:problema_inventario.vistas.GraphicForm.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./* w  w  w . j a  v a 2 s  .  c  om*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    okButton = new javax.swing.JButton();
    panelGrafica = new javax.swing.JPanel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    okButton.setText("OK");
    okButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            okButtonActionPerformed(evt);
        }
    });

    panelGrafica.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Grafica",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP,
            new java.awt.Font("Tahoma", 0, 14))); // NOI18N

    javax.swing.GroupLayout panelGraficaLayout = new javax.swing.GroupLayout(panelGrafica);
    panelGrafica.setLayout(panelGraficaLayout);
    panelGraficaLayout.setHorizontalGroup(panelGraficaLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 566, Short.MAX_VALUE));
    panelGraficaLayout.setVerticalGroup(panelGraficaLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 278, Short.MAX_VALUE));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(panelGrafica, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                    layout.createSequentialGroup()
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(248, 248, 248)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addComponent(panelGrafica, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(okButton).addContainerGap()));

    pack();
}

From source file:JQGraphicModule.QueryTableApp.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//w  w  w  .j av  a2  s .  c  om
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    lineas = new javax.swing.JPanel();
    l = new javax.swing.JRadioButton();
    b = new javax.swing.JRadioButton();
    p = new javax.swing.JRadioButton();
    jButton1 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    javax.swing.GroupLayout lineasLayout = new javax.swing.GroupLayout(lineas);
    lineas.setLayout(lineasLayout);
    lineasLayout.setHorizontalGroup(lineasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 397, Short.MAX_VALUE));
    lineasLayout.setVerticalGroup(lineasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 263, Short.MAX_VALUE));

    l.setText("Linear");
    l.setToolTipText("");
    l.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            lActionPerformed(evt);
        }
    });

    b.setText("Bar");
    b.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            bActionPerformed(evt);
        }
    });

    p.setText("Pie");
    p.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pActionPerformed(evt);
        }
    });

    jButton1.setText("Graphicate");
    jButton1.setToolTipText("");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(l).addComponent(b).addComponent(p).addComponent(jButton1))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 73, Short.MAX_VALUE)
                    .addComponent(lineas, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(lineas, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(61, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup().addComponent(l)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(b)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(p)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton1).addGap(86, 86, 86)))));

    pack();
}

From source file:EspectroForm.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./* w  w  w.ja v  a2 s . c  o  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    spectroPanel = new javax.swing.JPanel();
    okButton = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setMaximumSize(new java.awt.Dimension(500, 375));
    setMinimumSize(new java.awt.Dimension(500, 375));
    setResizable(false);

    javax.swing.GroupLayout spectroPanelLayout = new javax.swing.GroupLayout(spectroPanel);
    spectroPanel.setLayout(spectroPanelLayout);
    spectroPanelLayout.setHorizontalGroup(spectroPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 540, Short.MAX_VALUE));
    spectroPanelLayout.setVerticalGroup(spectroPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 390, Short.MAX_VALUE));

    okButton.setText("OK");
    okButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            okButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(spectroPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                    layout.createSequentialGroup().addGap(198, 198, 198).addComponent(okButton,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(199, 199, 199)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(spectroPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGap(18, 18, 18).addComponent(okButton).addGap(33, 33, 33)));

    pack();
}

From source file:stratego.neural.net.RandomSampleTest.java

private static void plotDataSet(List<double[]> data) {

    XYSeriesCollection plotData = new XYSeriesCollection();

    for (double[] ds : data) {

        XYSeries series = new XYSeries("Winrate");

        for (int i = 0; i < ds.length; i++) {
            series.add((double) i, ds[i]);
        }// w ww .  j a  v a  2 s . c om

        plotData.addSeries(series);
    }

    String title = "Simulating Random Samples";
    String xAxisLabel = "Matches";
    String yAxisLabel = "Winrate";
    PlotOrientation orientation = PlotOrientation.VERTICAL;
    boolean legend = false; // might wanna set this to true at some point, but research the library
    boolean tooltips = false;
    boolean urls = false;
    JFreeChart chart = ChartFactory.createScatterPlot(title, xAxisLabel, yAxisLabel, plotData, orientation,
            legend, tooltips, urls);

    JPanel panel = new ChartPanel(chart);

    JFrame f = new JFrame();
    f.add(panel);
    f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    f.pack();
    f.setTitle("Random test simulation");

    f.setVisible(true);
}

From source file:courseapplication.CourseApplication1.java

/**
 * Creates new form CourseApplication1/*from  w w  w  . ja  v  a  2  s . com*/
 */
private CourseApplication1() {
    initComponents();
    setContentPane(jPanel1);
    setVisible(true);
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    setLocationRelativeTo(null);
    setTitle("Interpolation");
    pack();
    fc.setFileSelectionMode(JFileChooser.FILES_ONLY);

}

From source file:com.philips.cn.hr.pps.App.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//  w w w  .j  a v  a  2  s. c om
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    uploadBtn1 = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    filePath1 = new javax.swing.JTextField();
    jLabel2 = new javax.swing.JLabel();
    filePath2 = new javax.swing.JTextField();
    uploadBtn2 = new javax.swing.JButton();
    jLabel3 = new javax.swing.JLabel();
    saveToPath = new javax.swing.JTextField();
    saveToBtn = new javax.swing.JButton();
    startCaclBtn = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Philips China PPS Automation");
    setType(java.awt.Window.Type.UTILITY);

    uploadBtn1.setText("choose");
    uploadBtn1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            uploadBtn1ActionPerformed(evt);
        }
    });

    jLabel1.setText("Employee basic salary file");

    jLabel2.setText("Employee AI file");

    uploadBtn2.setText("choose");
    uploadBtn2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            uploadBtn2ActionPerformed(evt);
        }
    });

    jLabel3.setText("Save to");

    saveToBtn.setText("choose");
    saveToBtn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveToBtnActionPerformed(evt);
        }
    });

    startCaclBtn.setText("Start Calculation...");
    startCaclBtn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            startCaclBtnActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(startCaclBtn))
                            .addGroup(layout.createSequentialGroup().addGap(72, 72, 72)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel1).addComponent(jLabel2).addComponent(jLabel3))
                                    .addGap(42, 42, 42)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(filePath1).addComponent(filePath2)
                                            .addComponent(saveToPath, javax.swing.GroupLayout.DEFAULT_SIZE, 638,
                                                    Short.MAX_VALUE))))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(uploadBtn1).addComponent(uploadBtn2).addComponent(saveToBtn))
                    .addGap(66, 66, 66)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(35, 35, 35).addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(filePath1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(uploadBtn1)).addGap(29, 29, 29)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel2)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(filePath2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(uploadBtn2)))
                    .addGap(34, 34, 34)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(saveToPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(saveToBtn))
                    .addGap(36, 36, 36).addComponent(startCaclBtn)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pack();
    setLocationRelativeTo(null);
}

From source file:com.javafxpert.neuralnetviz.scenario.PlotUtil.java

/**Plot the training data. Assume 2d input, classification output
 * @param features Training data features
 * @param labels Training data labels (one-hot representation)
 * @param backgroundIn sets of x,y points in input space, plotted in the background
 * @param backgroundOut results of network evaluation at points in x,y points in space
 * @param nDivisions Number of points (per axis, for the backgroundIn/backgroundOut arrays)
 *//*from  w ww  .  j av  a 2s  .c  o  m*/
public static void plotTrainingData(INDArray features, INDArray labels, INDArray backgroundIn,
        INDArray backgroundOut, int nDivisions) {
    double[] mins = backgroundIn.min(0).data().asDouble();
    double[] maxs = backgroundIn.max(0).data().asDouble();

    XYZDataset backgroundData = createBackgroundData(backgroundIn, backgroundOut);
    JPanel panel = new ChartPanel(
            createChart(backgroundData, mins, maxs, nDivisions, createDataSetTrain(features, labels)));

    JFrame f = new JFrame();
    f.add(panel);
    f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    f.pack();
    f.setTitle("Training Data");

    f.setVisible(true);
}

From source file:cmsc105_mp2.Plot.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*www  . j a  va  2s . c  o  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jButton1 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jButton1.setText("SAVE");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                            .addContainerGap(575, Short.MAX_VALUE).addComponent(jButton1).addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 305,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jButton1)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
            jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
            Short.MAX_VALUE));

    pack();
}

From source file:pl.piotrsukiennik.jbrain.gui.JBrainMainFrame.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*ww  w.  j  a v a  2s.  com*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    bottomDescription = new javax.swing.JLabel();
    leftColumnMenu = new javax.swing.JTree();
    mainPanel = new javax.swing.JPanel();
    mainMenuBar = new javax.swing.JMenuBar();
    fileMenu = new javax.swing.JMenu();
    newMenuItem = new javax.swing.JMenuItem();
    openMenuItem = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JPopupMenu.Separator();
    saveMenuItem = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("JBrain Manager");

    bottomDescription.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    bottomDescription.setText("Piotr Sukiennik @ PJIIT 2014");

    javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("options");
    javax.swing.tree.DefaultMutableTreeNode treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("model");
    treeNode1.add(treeNode2);
    treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("simulations");
    javax.swing.tree.DefaultMutableTreeNode treeNode3 = new javax.swing.tree.DefaultMutableTreeNode(
            "new simulation");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("history");
    treeNode2.add(treeNode3);
    treeNode1.add(treeNode2);
    leftColumnMenu.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
    leftColumnMenu.setRootVisible(false);
    leftColumnMenu.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
        public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
            leftColumnMenuValueChanged(evt);
        }
    });

    mainPanel.setBackground(new java.awt.Color(255, 255, 255));
    mainPanel.setLayout(new java.awt.CardLayout());

    fileMenu.setText("File");

    newMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N,
            java.awt.event.InputEvent.CTRL_MASK));
    newMenuItem.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/pl/piotrsukiennik/jbrain/gui/icons/file-2x.png"))); // NOI18N
    newMenuItem.setText("New");
    newMenuItem.setEnabled(false);
    newMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            newMenuItemActionPerformed(evt);
        }
    });
    fileMenu.add(newMenuItem);

    openMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O,
            java.awt.event.InputEvent.CTRL_MASK));
    openMenuItem.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/pl/piotrsukiennik/jbrain/gui/icons/folder-2x.png"))); // NOI18N
    openMenuItem.setText("Open");
    openMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            openMenuItemActionPerformed(evt);
        }
    });
    fileMenu.add(openMenuItem);
    fileMenu.add(jSeparator1);

    saveMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.event.InputEvent.CTRL_MASK));
    saveMenuItem.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/pl/piotrsukiennik/jbrain/gui/icons/data-transfer-download-2x.png"))); // NOI18N
    saveMenuItem.setText("Save");
    saveMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveMenuItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveMenuItem);

    mainMenuBar.add(fileMenu);

    setJMenuBar(mainMenuBar);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(leftColumnMenu, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap())
            .addComponent(bottomDescription, javax.swing.GroupLayout.DEFAULT_SIZE, 721, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(leftColumnMenu, javax.swing.GroupLayout.DEFAULT_SIZE, 360,
                                    Short.MAX_VALUE)
                            .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(bottomDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 22,
                            javax.swing.GroupLayout.PREFERRED_SIZE)));

    pack();
}