Example usage for javax.swing WindowConstants DO_NOTHING_ON_CLOSE

List of usage examples for javax.swing WindowConstants DO_NOTHING_ON_CLOSE

Introduction

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

Prototype

int DO_NOTHING_ON_CLOSE

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

Click Source Link

Document

The do-nothing default window close operation.

Usage

From source file:jmemorize.gui.swing.frames.MainFrame.java

private void initComponents() {
    final JPanel mainPanel = new JPanel(new BorderLayout());

    m_deckChartPanel = new DeckChartPanel(this);
    m_deckChartPanel.setMinimumSize(new Dimension(100, 150));

    m_learnPanel = new LearnPanel();
    m_deckTablePanel = new DeckTablePanel(this);

    // north panel
    final JPanel northPanel = new JPanel();
    northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
    northPanel.add(buildOperationsBar());
    northPanel.add(buildCategoryBar());//w  ww.j av  a 2  s.com

    m_categoryTree = new CategoryTree(jMemorizeIO);
    m_categoryTree.addSelectionObserver(new SelectionObserver() {

        @Override
        public void selectionChanged(final SelectionProvider source) {
            treeSelectionChanged(source);
        }

    });
    m_treeScrollPane = new JScrollPane(m_categoryTree);

    // bottom panel
    m_bottomPanel = new JPanel(new CardLayout());
    m_bottomPanel.add(m_deckTablePanel, DECK_CARD);
    m_bottomPanel.add(m_learnPanel, REPEAT_CARD);

    // vertical split pane
    m_verticalSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    m_verticalSplitPane.setPreferredSize(new Dimension(16, 500));
    m_verticalSplitPane.setBorder(null);
    beautifyDividerBorder(m_verticalSplitPane);

    m_verticalSplitPane.setTopComponent(m_deckChartPanel);
    m_verticalSplitPane.setBottomComponent(m_bottomPanel);

    mainPanel.setPreferredSize(new Dimension(800, 500));
    mainPanel.add(m_verticalSplitPane, BorderLayout.CENTER);

    // horizontal split pane
    m_horizontalSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    m_horizontalSplitPane.setDividerLocation(m_categoryTreeWidth);
    m_horizontalSplitPane.setDividerSize(DIVIDER_SIZE);
    m_horizontalSplitPane.setBorder(null);

    m_horizontalSplitPane.setLeftComponent(m_treeScrollPane);
    m_horizontalSplitPane.setRightComponent(mainPanel);

    // frame content pane
    getContentPane().add(northPanel, BorderLayout.NORTH);
    getContentPane().add(m_horizontalSplitPane, BorderLayout.CENTER);
    getContentPane().add(m_statusBar, BorderLayout.SOUTH);
    setJMenuBar(new MainMenu(this, m_main.getRecentLessonFiles(), jMemorizeIO, this));

    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(final WindowEvent evt) {
            ExitAction.exit();
        }
    });

    setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/resource/icons/main.png"))); //$NON-NLS-1$
    pack();
}

From source file:net.cantab.hayward.george.OCS.Statics.java

/**
 * Create the normal toolbar entries/*from  w ww  .  j  a  va 2  s  .  c om*/
 */
void createNormalEntries() {
    commandLaunch = new JButton("Command...");
    commandLaunch.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            launchCommandMenu();
        }
    });
    commandLaunch.setFocusable(false);
    commandLaunch.setToolTipText("Take/Resign command of a side");
    toolbar.add(commandLaunch);
    instructions = new JButton("Scenario Notes");
    instructions.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            displayInstructions();
        }
    });
    instructions.setFocusable(false);
    toolbar.add(instructions);
    /*
     * If in edit mode add option to process pieces to OCS module form quickly
     */
    if (GameModule.getGameModule().getArchiveWriter() != null) {
        piecesLaunch = new JButton("Piece Definitions");
        piecesLaunch.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                piecesProcess();
            }
        });
        piecesLaunch.setFocusable(false);
        toolbar.add(piecesLaunch);
        piecesWindow = new JDialog(GameModule.getGameModule().getFrame());
        piecesWindow.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
        piecesWindow.setTitle("Piece definitions");
        piecesWindow.setSize(700, 500);
        piecesWindow.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                piecesWindow.setVisible(false);
            }
        });
        piecesWindow.add(new PieceProcessor());
        textLaunch = new JButton("Read Scenario from Text File");
        textLaunch.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                readTextFile();
            }
        });
        textLaunch.setFocusable(false);
        textLaunch.setEnabled(false);
        toolbar.add(textLaunch);
        createPieces = new JButton("Create Pieces from file");
        createPieces.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                createPiecesFromFile();
            }
        });
        createPieces.setFocusable(false);
        createPieces.setEnabled(true);
        toolbar.add(createPieces);
        checkOrder = new JButton("Check Layers/Mask Order");
        checkOrder.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                checkLayerOrders();
            }
        });
        checkOrder.setFocusable(false);
        checkOrder.setEnabled(true);
        toolbar.add(checkOrder);
    }
}

From source file:edu.ku.brc.specify.BackupAndRestoreApp.java

/**
 * Restarts the app with a new or old database and user name and creates the core app UI.
 * @param window the login window//w ww .j  a v a 2  s.  c  o m
 * @param databaseNameArg the database name
 * @param userNameArg the user name
 * @param startOver tells the AppContext to start over
 * @param firstTime indicates this is the first time in the application and it should create all the UI for the core app
 */
public void restartApp(final Window window, final String databaseNameArg, final String userNameArg,
        final boolean startOver, final boolean firstTime) {
    log.debug("restartApp"); //$NON-NLS-1$
    if (dbLoginPanel != null) {
        dbLoginPanel.getStatusBar().setText(getResourceString("Specify.INITIALIZING_APP")); //$NON-NLS-1$
    }

    if (firstTime) {
        GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice()
                .getDefaultConfiguration();

        initialize(gc);

        topFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
        UIRegistry.register(UIRegistry.FRAME, topFrame);

    }

    if (window != null) {
        window.setVisible(false);
    }

    showApp();

    statusField.setText(DBConnection.getInstance().getDatabaseName());

    if (dbLoginPanel != null) {
        dbLoginPanel.getWindow().setVisible(false);
    }
}

From source file:com.tiempometa.muestradatos.JMuestraDatos.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    ResourceBundle bundle = ResourceBundle.getBundle("com.tiempometa.muestradatos.muestradatos");
    menuBar1 = new JMenuBar();
    menu1 = new JMenu();
    configMenuItem = new JMenuItem();
    importTagsMenuItem = new JMenuItem();
    exportTagsMenuItem = new JMenuItem();
    clearTagsMenuItem = new JMenuItem();
    exitMenuItem = new JMenuItem();
    menu3 = new JMenu();
    aboutUsMenuItem = new JMenuItem();
    configureJavaMenuItem = new JMenuItem();
    panel5 = new JPanel();
    panel3 = new JPanel();
    panel4 = new JPanel();
    tabbedPane1 = new JTabbedPane();
    panel2 = new JPanel();
    label9 = new JLabel();
    label10 = new JLabel();
    label3 = new JLabel();
    readerPortLabel = new JLabel();
    label11 = new JLabel();
    boxIpAddressLabel = new JLabel();
    label4 = new JLabel();
    readerStatusLabel = new JLabel();
    label12 = new JLabel();
    boxTypeLabel = new JLabel();
    label2 = new JLabel();
    rssiLevelLabel = new JLabel();
    label13 = new JLabel();
    preferredReaderLabel = new JLabel();
    label5 = new JLabel();
    regionLabel = new JLabel();
    label14 = new JLabel();
    preferredAntenaLabel = new JLabel();
    label6 = new JLabel();
    readPowerLabel = new JLabel();
    label7 = new JLabel();
    writePowerLevel = new JLabel();
    usbConnectButton = new JButton();
    boxConnectButton = new JButton();
    panel1 = new JPanel();
    verifyDataButton = new JButton();
    loadReadingsButton = new JButton();
    readTagButton = new JButton();
    countTagsButton = new JButton();
    programTagButton = new JButton();
    panel8 = new JPanel();
    setBoxTimeButton = new JButton();
    getBoxTimeButton = new JButton();
    label20 = new JLabel();
    label19 = new JLabel();
    systemTimeLabel = new JLabel();
    foxberryTimeLabel = new JLabel();
    foxberryTimeDiffLabel = new JLabel();
    panel6 = new JPanel();
    label21 = new JLabel();
    label1 = new JLabel();
    usbStatusLabel = new JLabel();
    label16 = new JLabel();
    tcpStatusLabel = new JLabel();
    label8 = new JLabel();
    databaseLabel = new JLabel();
    panel7 = new JPanel();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle(bundle.getString("JMuestraDatos.this.title"));
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    setIconImage(//from   w w w .jav  a 2 s.c  o m
            new ImageIcon(getClass().getResource("/com/tiempometa/resources/tiempometa_icon_large_alpha.png"))
                    .getImage());
    setResizable(false);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== menuBar1 ========
    {

        //======== menu1 ========
        {
            menu1.setText(bundle.getString("JMuestraDatos.menu1.text"));

            //---- configMenuItem ----
            configMenuItem.setText(bundle.getString("JMuestraDatos.configMenuItem.text"));
            configMenuItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    configMenuItemActionPerformed(e);
                }
            });
            menu1.add(configMenuItem);

            //---- importTagsMenuItem ----
            importTagsMenuItem.setText(bundle.getString("JMuestraDatos.importTagsMenuItem.text"));
            importTagsMenuItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    importTagsMenuItemActionPerformed(e);
                }
            });
            menu1.add(importTagsMenuItem);

            //---- exportTagsMenuItem ----
            exportTagsMenuItem.setText(bundle.getString("JMuestraDatos.exportTagsMenuItem.text"));
            exportTagsMenuItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    exportTagsMenuItemActionPerformed(e);
                }
            });
            menu1.add(exportTagsMenuItem);

            //---- clearTagsMenuItem ----
            clearTagsMenuItem.setText(bundle.getString("JMuestraDatos.clearTagsMenuItem.text"));
            clearTagsMenuItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    clearTagsMenuItemActionPerformed(e);
                }
            });
            menu1.add(clearTagsMenuItem);
            menu1.addSeparator();

            //---- exitMenuItem ----
            exitMenuItem.setText(bundle.getString("JMuestraDatos.exitMenuItem.text"));
            exitMenuItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    menuItem2ActionPerformed(e);
                }
            });
            menu1.add(exitMenuItem);
        }
        menuBar1.add(menu1);

        //======== menu3 ========
        {
            menu3.setText(bundle.getString("JMuestraDatos.menu3.text"));

            //---- aboutUsMenuItem ----
            aboutUsMenuItem.setText(bundle.getString("JMuestraDatos.aboutUsMenuItem.text"));
            aboutUsMenuItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    aboutUsMenuItemActionPerformed(e);
                }
            });
            menu3.add(aboutUsMenuItem);

            //---- configureJavaMenuItem ----
            configureJavaMenuItem.setText(bundle.getString("JMuestraDatos.configureJavaMenuItem.text"));
            configureJavaMenuItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    configureJavaMenuItemActionPerformed(e);
                }
            });
            menu3.add(configureJavaMenuItem);
        }
        menuBar1.add(menu3);
    }
    setJMenuBar(menuBar1);

    //======== panel5 ========
    {
        panel5.setLayout(new FormLayout(
                new ColumnSpec[] { new ColumnSpec(Sizes.dluX(18)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        new ColumnSpec(Sizes.dluX(343)) },
                new RowSpec[] { new RowSpec(Sizes.dluY(17)), FormFactory.LINE_GAP_ROWSPEC,
                        new RowSpec(Sizes.dluY(17)) }));
    }
    contentPane.add(panel5, BorderLayout.NORTH);

    //======== panel3 ========
    {
        panel3.setLayout(new FormLayout(
                new ColumnSpec[] { new ColumnSpec(Sizes.dluX(16)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        FormFactory.DEFAULT_COLSPEC },
                new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                        FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                        FormFactory.DEFAULT_ROWSPEC }));
    }
    contentPane.add(panel3, BorderLayout.WEST);

    //======== panel4 ========
    {
        panel4.setLayout(
                new FormLayout(
                        new ColumnSpec[] { new ColumnSpec(Sizes.dluX(410)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                        RowSpec.decodeSpecs("245dlu")));

        //======== tabbedPane1 ========
        {
            tabbedPane1.setFont(new Font("Tahoma", Font.BOLD, 16));

            //======== panel2 ========
            {
                panel2.setLayout(new FormLayout(
                        new ColumnSpec[] { new ColumnSpec(Sizes.dluX(25)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(89)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(73)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(17)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(84)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(80)) },
                        new RowSpec[] { new RowSpec(Sizes.dluY(20)), FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                new RowSpec(Sizes.DLUY8) }));

                //---- label9 ----
                label9.setText(bundle.getString("JMuestraDatos.label9.text"));
                label9.setFont(new Font("Tahoma", Font.BOLD, 16));
                label9.setIcon(new ImageIcon(getClass().getResource("/com/tiempometa/resources/usb_128.png")));
                label9.setHorizontalAlignment(SwingConstants.CENTER);
                panel2.add(label9, cc.xywh(3, 3, 3, 1));

                //---- label10 ----
                label10.setText(bundle.getString("JMuestraDatos.label10.text"));
                label10.setFont(new Font("Tahoma", Font.BOLD, 16));
                label10.setIcon(
                        new ImageIcon(getClass().getResource("/com/tiempometa/resources/briefcase_128.png")));
                label10.setHorizontalAlignment(SwingConstants.CENTER);
                panel2.add(label10, cc.xywh(9, 3, 3, 1));

                //---- label3 ----
                label3.setText(bundle.getString("JMuestraDatos.label3.text"));
                label3.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label3, cc.xy(3, 5));

                //---- readerPortLabel ----
                readerPortLabel.setText(bundle.getString("JMuestraDatos.readerPortLabel.text"));
                panel2.add(readerPortLabel, cc.xy(5, 5));

                //---- label11 ----
                label11.setText(bundle.getString("JMuestraDatos.label11.text"));
                label11.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label11, cc.xy(9, 5));

                //---- boxIpAddressLabel ----
                boxIpAddressLabel.setText(bundle.getString("JMuestraDatos.boxIpAddressLabel.text"));
                panel2.add(boxIpAddressLabel, cc.xy(11, 5));

                //---- label4 ----
                label4.setText(bundle.getString("JMuestraDatos.label4.text"));
                label4.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label4, cc.xy(3, 7));

                //---- readerStatusLabel ----
                readerStatusLabel.setText(bundle.getString("JMuestraDatos.readerStatusLabel.text"));
                panel2.add(readerStatusLabel, cc.xy(5, 7));

                //---- label12 ----
                label12.setText(bundle.getString("JMuestraDatos.label12.text"));
                label12.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label12, cc.xy(9, 7));

                //---- boxTypeLabel ----
                boxTypeLabel.setText(bundle.getString("JMuestraDatos.boxTypeLabel.text"));
                panel2.add(boxTypeLabel, cc.xy(11, 7));

                //---- label2 ----
                label2.setText(bundle.getString("JMuestraDatos.label2.text"));
                label2.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label2, cc.xy(3, 9));

                //---- rssiLevelLabel ----
                rssiLevelLabel.setText(bundle.getString("JMuestraDatos.rssiLevelLabel.text"));
                panel2.add(rssiLevelLabel, cc.xy(5, 9));

                //---- label13 ----
                label13.setText(bundle.getString("JMuestraDatos.label13.text"));
                label13.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label13, cc.xy(9, 9));

                //---- preferredReaderLabel ----
                preferredReaderLabel.setText(bundle.getString("JMuestraDatos.preferredReaderLabel.text"));
                panel2.add(preferredReaderLabel, cc.xy(11, 9));

                //---- label5 ----
                label5.setText(bundle.getString("JMuestraDatos.label5.text"));
                label5.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label5, cc.xy(3, 11));

                //---- regionLabel ----
                regionLabel.setText(bundle.getString("JMuestraDatos.regionLabel.text"));
                panel2.add(regionLabel, cc.xy(5, 11));

                //---- label14 ----
                label14.setText(bundle.getString("JMuestraDatos.label14.text"));
                label14.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label14, cc.xy(9, 11));

                //---- preferredAntenaLabel ----
                preferredAntenaLabel.setText(bundle.getString("JMuestraDatos.preferredAntenaLabel.text"));
                panel2.add(preferredAntenaLabel, cc.xy(11, 11));

                //---- label6 ----
                label6.setText(bundle.getString("JMuestraDatos.label6.text"));
                label6.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label6, cc.xy(3, 13));

                //---- readPowerLabel ----
                readPowerLabel.setText(bundle.getString("JMuestraDatos.readPowerLabel.text"));
                panel2.add(readPowerLabel, cc.xy(5, 13));

                //---- label7 ----
                label7.setText(bundle.getString("JMuestraDatos.label7.text"));
                label7.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel2.add(label7, cc.xy(3, 15));

                //---- writePowerLevel ----
                writePowerLevel.setText(bundle.getString("JMuestraDatos.writePowerLevel.text"));
                panel2.add(writePowerLevel, cc.xy(5, 15));

                //---- usbConnectButton ----
                usbConnectButton.setText(bundle.getString("JMuestraDatos.usbConnectButton.text"));
                usbConnectButton.setFont(new Font("Tahoma", Font.BOLD, 14));
                usbConnectButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        usbConnectButtonActionPerformed(e);
                    }
                });
                panel2.add(usbConnectButton, cc.xywh(3, 17, 3, 1));

                //---- boxConnectButton ----
                boxConnectButton.setText(bundle.getString("JMuestraDatos.boxConnectButton.text"));
                boxConnectButton.setFont(new Font("Tahoma", Font.BOLD, 14));
                boxConnectButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        boxConnectButtonActionPerformed(e);
                    }
                });
                panel2.add(boxConnectButton, cc.xywh(9, 17, 3, 1));
            }
            tabbedPane1.addTab(bundle.getString("JMuestraDatos.panel2.tab.title"), panel2);

            //======== panel1 ========
            {
                panel1.setLayout(new FormLayout(
                        new ColumnSpec[] { new ColumnSpec(Sizes.dluX(35)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(120)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(47)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(130)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(28)) },
                        new RowSpec[] { new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC }));

                //---- verifyDataButton ----
                verifyDataButton.setText(bundle.getString("JMuestraDatos.verifyDataButton.text"));
                verifyDataButton.setIcon(
                        new ImageIcon(getClass().getResource("/com/tiempometa/resources/check_64.png")));
                verifyDataButton.setHorizontalAlignment(SwingConstants.LEFT);
                verifyDataButton.setRolloverIcon(null);
                verifyDataButton.setPressedIcon(null);
                verifyDataButton.setFont(new Font("Tahoma", Font.BOLD, 16));
                verifyDataButton.setEnabled(false);
                verifyDataButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        verifyDataButtonActionPerformed(e);
                    }
                });
                panel1.add(verifyDataButton, cc.xywh(3, 3, 3, 1));

                //---- loadReadingsButton ----
                loadReadingsButton.setText(bundle.getString("JMuestraDatos.loadReadingsButton.text"));
                loadReadingsButton.setIcon(
                        new ImageIcon(getClass().getResource("/com/tiempometa/resources/load_64.png")));
                loadReadingsButton.setHorizontalAlignment(SwingConstants.LEFT);
                loadReadingsButton.setFont(new Font("Tahoma", Font.BOLD, 16));
                loadReadingsButton.setEnabled(false);
                loadReadingsButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        loadReadingsButtonActionPerformed(e);
                    }
                });
                panel1.add(loadReadingsButton, cc.xywh(7, 3, 3, 1));

                //---- readTagButton ----
                readTagButton.setText(bundle.getString("JMuestraDatos.readTagButton.text"));
                readTagButton.setIcon(
                        new ImageIcon(getClass().getResource("/com/tiempometa/resources/scan_64.png")));
                readTagButton.setHorizontalAlignment(SwingConstants.LEFT);
                readTagButton.setFont(new Font("Tahoma", Font.BOLD, 16));
                readTagButton.setEnabled(false);
                readTagButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        readTagButtonActionPerformed(e);
                    }
                });
                panel1.add(readTagButton, cc.xywh(3, 5, 3, 1));

                //---- countTagsButton ----
                countTagsButton.setText(bundle.getString("JMuestraDatos.countTagsButton.text"));
                countTagsButton.setIcon(
                        new ImageIcon(getClass().getResource("/com/tiempometa/resources/counter_64.png")));
                countTagsButton.setHorizontalAlignment(SwingConstants.LEFT);
                countTagsButton.setFont(new Font("Tahoma", Font.BOLD, 16));
                countTagsButton.setEnabled(false);
                countTagsButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        countTagsButtonActionPerformed(e);
                    }
                });
                panel1.add(countTagsButton, cc.xywh(7, 5, 3, 1));

                //---- programTagButton ----
                programTagButton.setText(bundle.getString("JMuestraDatos.programTagButton.text"));
                programTagButton.setIcon(
                        new ImageIcon(getClass().getResource("/com/tiempometa/resources/record_64.png")));
                programTagButton.setHorizontalAlignment(SwingConstants.LEFT);
                programTagButton.setFont(new Font("Tahoma", Font.BOLD, 16));
                programTagButton.setEnabled(false);
                programTagButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        programTagButtonActionPerformed(e);
                    }
                });
                panel1.add(programTagButton, cc.xywh(3, 7, 3, 1));
            }
            tabbedPane1.addTab(bundle.getString("JMuestraDatos.panel1.tab.title"), panel1);

            //======== panel8 ========
            {
                panel8.setLayout(new FormLayout(
                        new ColumnSpec[] { new ColumnSpec(Sizes.dluX(35)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(160)),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(160)) },
                        new RowSpec[] { new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC }));

                //---- setBoxTimeButton ----
                setBoxTimeButton.setText(bundle.getString("JMuestraDatos.setBoxTimeButton.text"));
                setBoxTimeButton.setIcon(
                        new ImageIcon(getClass().getResource("/com/tiempometa/resources/set_time_64.png")));
                setBoxTimeButton.setHorizontalAlignment(SwingConstants.LEFT);
                setBoxTimeButton.setFont(new Font("Tahoma", Font.BOLD, 16));
                setBoxTimeButton.setEnabled(false);
                setBoxTimeButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        setBoxTimeButtonActionPerformed(e);
                    }
                });
                panel8.add(setBoxTimeButton, cc.xy(3, 3));

                //---- getBoxTimeButton ----
                getBoxTimeButton.setText(bundle.getString("JMuestraDatos.getBoxTimeButton.text"));
                getBoxTimeButton.setIcon(
                        new ImageIcon(getClass().getResource("/com/tiempometa/resources/get_time_64.png")));
                getBoxTimeButton.setHorizontalAlignment(SwingConstants.LEFT);
                getBoxTimeButton.setFont(new Font("Tahoma", Font.BOLD, 16));
                getBoxTimeButton.setEnabled(false);
                getBoxTimeButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        getBoxTimeButtonActionPerformed(e);
                    }
                });
                panel8.add(getBoxTimeButton, cc.xy(5, 3));

                //---- label20 ----
                label20.setText(bundle.getString("JMuestraDatos.label20.text"));
                label20.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel8.add(label20, cc.xy(3, 5));

                //---- label19 ----
                label19.setText(bundle.getString("JMuestraDatos.label19.text"));
                label19.setFont(new Font("Tahoma", Font.BOLD, 14));
                panel8.add(label19, cc.xy(5, 5));
                panel8.add(systemTimeLabel, cc.xy(3, 7));
                panel8.add(foxberryTimeLabel, cc.xy(5, 7));
                panel8.add(foxberryTimeDiffLabel, cc.xy(5, 9));
            }
            tabbedPane1.addTab(bundle.getString("JMuestraDatos.panel8.tab.title"), panel8);
        }
        panel4.add(tabbedPane1, cc.xy(1, 1));
    }
    contentPane.add(panel4, BorderLayout.CENTER);

    //======== panel6 ========
    {
        panel6.setLayout(new FormLayout(
                new ColumnSpec[] { new ColumnSpec(Sizes.dluX(17)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        new ColumnSpec(Sizes.dluX(65)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        new ColumnSpec(Sizes.dluX(65)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        new ColumnSpec(Sizes.dluX(199)) },
                new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                        FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                        FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)) }));

        //---- label21 ----
        label21.setText(bundle.getString("JMuestraDatos.label21.text"));
        label21.setFont(new Font("Tahoma", Font.BOLD, 16));
        panel6.add(label21, cc.xy(3, 1));

        //---- label1 ----
        label1.setText(bundle.getString("JMuestraDatos.label1.text"));
        label1.setFont(new Font("Tahoma", Font.PLAIN, 14));
        panel6.add(label1, cc.xy(5, 1));

        //---- usbStatusLabel ----
        usbStatusLabel.setText(bundle.getString("JMuestraDatos.usbStatusLabel.text"));
        usbStatusLabel.setFont(new Font("Tahoma", Font.PLAIN, 14));
        panel6.add(usbStatusLabel, cc.xy(7, 1));

        //---- label16 ----
        label16.setText(bundle.getString("JMuestraDatos.label16.text"));
        label16.setFont(new Font("Tahoma", Font.PLAIN, 14));
        panel6.add(label16, cc.xy(9, 1));

        //---- tcpStatusLabel ----
        tcpStatusLabel.setText(bundle.getString("JMuestraDatos.tcpStatusLabel.text"));
        tcpStatusLabel.setFont(new Font("Tahoma", Font.PLAIN, 14));
        panel6.add(tcpStatusLabel, cc.xy(11, 1));

        //---- label8 ----
        label8.setText(bundle.getString("JMuestraDatos.label8.text"));
        label8.setFont(new Font("Tahoma", Font.BOLD, 16));
        panel6.add(label8, cc.xy(3, 3));

        //---- databaseLabel ----
        databaseLabel.setText(bundle.getString("JMuestraDatos.databaseLabel.text"));
        panel6.add(databaseLabel, cc.xywh(3, 5, 11, 1));
    }
    contentPane.add(panel6, BorderLayout.SOUTH);

    //======== panel7 ========
    {
        panel7.setLayout(new FormLayout(
                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        FormFactory.DEFAULT_COLSPEC },
                new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                        FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                        FormFactory.DEFAULT_ROWSPEC }));
    }
    contentPane.add(panel7, BorderLayout.EAST);
    setSize(740, 620);
    setLocationRelativeTo(getOwner());
    // //GEN-END:initComponents
}

From source file:analisis_proyecto1.Ventana_principal.java

private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton6MouseClicked
    /*puntos.add(new puntos(2, 3));
      puntos.add(new puntos(12, 30));//from   www .j a  va2  s.co  m
      puntos.add(new puntos(40, 50));
      puntos.add(new puntos(5, 1));
      puntos.add(new puntos(3, 14));
      puntos.add(new puntos(20, 4));
      puntos.add(new puntos(1, 10));
      puntos.add(new puntos(20, 24));
      puntos.add(new puntos(10, 3));
      puntos.add(new puntos(12, 3));
      puntos.add(new puntos(7, 3));
      puntos.add(new puntos(21, 7));
      puntos.add(new puntos(10, 7));
      puntos.add(new puntos(15, 1));
      puntos.add(new puntos(9, 5));
      puntos.add(new puntos(24, 5));
      puntos.add(new puntos(30, 6));
      puntos.add(new puntos(38, 60));*/
    if (puntos.size() == 1) {
        JOptionPane.showMessageDialog(null, "Solo existe un punto");
    } else {

        puntos[] general1 = convertir();
        puntos[] general2 = convertir();
        puntos[] Px = sortx(general1);
        puntos[] Py = sorty(general2);
        this.ParMasCercano = new cerca(puntos);
        distancia = this.ParMasCercano.mas_cerca(Px, Py, general1.length);
        medianas = this.ParMasCercano.getMedianas();
        bitacora = this.ParMasCercano.getBitacora();
        grafica.createDataset(puntos, null, 0);
        //----Panel Inicial-------------------------------
        actual = grafica.generar_panel(null, 0);

        //---------Boton Siguiente------------------------
        JButton next = new JButton("Siguiente");
        next.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                indicem++;
                indicep++;
                if (indicem < medianas.size()) {
                    panelpuntos.remove(actual);
                    if (indicep < bitacora.size()) {
                        grafica.createDataset(puntos, bitacora.get(indicep).getArreglo(), 0);
                    }
                    actual = grafica.generar_panel(medianas, indicem);
                    panelpuntos.add(actual);
                    panelpuntos.updateUI();
                } else if (indicem == medianas.size()) {
                    grafica.createDataset(puntos, distancia.getPuntos(), 1);
                    panelpuntos.remove(actual);
                    actual = grafica.generar_panel(medianas, indicem - 1);
                    panelpuntos.add(actual);
                    panelpuntos.updateUI();
                    String resp = "El par de puntos mas cercanos son:" + '\n';
                    resp += "(" + distancia.getPuntos()[0].getX() + "," + distancia.getPuntos()[0].getY() + ")";
                    resp += ",";
                    resp += "(" + distancia.getPuntos()[1].getX() + "," + distancia.getPuntos()[1].getY() + ")"
                            + '\n';
                    resp += "Distancia:" + distancia.getDistancia();
                    JOptionPane.showMessageDialog(null, resp);
                } else {
                    indicem = medianas.size() - 1;
                    indicep = bitacora.size() - 1;
                }

            }
        });

        //-----------Boton Antes-----------------
        JButton prev = new JButton("Antes");
        prev.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                indicem--;
                indicep--;
                if (indicem >= 0) {
                    panelpuntos.remove(actual);
                    if (indicep >= 0) {
                        grafica.createDataset(puntos, bitacora.get(indicep).getArreglo(), 0);
                    }
                    actual = grafica.generar_panel(medianas, indicem);
                    panelpuntos.add(actual);
                    panelpuntos.updateUI();

                } else {
                    indicem = 0;
                    indicep = 0;
                }

            }
        });
        //------------------------Ultima Accion------------------
        JButton terminar = new JButton("Salir");
        terminar.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                puntos_cercanos.dispose();
                par_cercano.dispose();
                puntos = new ArrayList();
                medianas = new ArrayList();
                bitacora = new ArrayList();
                indice = -1;
                indicem = -1;
                indicep = -1;
                panelpuntos = new JPanel(gridp);
                panel_botones = new JPanel(flowp);
                puntos_cercanos = new JFrame();
                puntos_cercanos.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

            }
        });

        this.panel_botones.add(prev);
        this.panel_botones.add(next);
        this.panel_botones.add(terminar);
        this.panelpuntos.add(this.panel_botones);
        panelpuntos.add(actual);
        this.puntos_cercanos.add(this.panelpuntos);
        this.puntos_cercanos.repaint();
        this.puntos_cercanos.pack();
        this.puntos_cercanos.setVisible(true);

    }
}

From source file:com.igormaznitsa.jhexed.swing.editor.ui.MainForm.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./*from   w  w w  . j a v a2 s .  c  o m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    panelMainArea = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    labelCellUnderMouse = new javax.swing.JLabel();
    labelZoomStatus = new javax.swing.JLabel();
    menuMain = new javax.swing.JMenuBar();
    menuFile = new javax.swing.JMenu();
    menuFileNew = new javax.swing.JMenuItem();
    menuItemFileOpen = new javax.swing.JMenuItem();
    menuFileSave = new javax.swing.JMenuItem();
    menuFileSaveAs = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JPopupMenu.Separator();
    menuFileExportAs = new javax.swing.JMenu();
    menuFileExportAsImage = new javax.swing.JMenuItem();
    menuFileExportAsSVG = new javax.swing.JMenuItem();
    menuFileExportAsXML = new javax.swing.JMenuItem();
    menuFileExportAsJavaConstants = new javax.swing.JMenuItem();
    jSeparator3 = new javax.swing.JPopupMenu.Separator();
    menuFileDocumentOptions = new javax.swing.JMenuItem();
    jSeparator4 = new javax.swing.JPopupMenu.Separator();
    menuFileExit = new javax.swing.JMenuItem();
    menuEdit = new javax.swing.JMenu();
    menuEditUndo = new javax.swing.JMenuItem();
    menuEditRedo = new javax.swing.JMenuItem();
    menuView = new javax.swing.JMenu();
    menuViewZoomIn = new javax.swing.JMenuItem();
    menuViewZoomOut = new javax.swing.JMenuItem();
    menuViewZoomReset = new javax.swing.JMenuItem();
    jSeparator2 = new javax.swing.JPopupMenu.Separator();
    menuViewBackImage = new javax.swing.JCheckBoxMenuItem();
    menuShowHexBorders = new javax.swing.JCheckBoxMenuItem();
    menuPlugins = new javax.swing.JMenu();
    menuWindow = new javax.swing.JMenu();
    menuWindowLayers = new javax.swing.JCheckBoxMenuItem();
    menuWindowTools = new javax.swing.JCheckBoxMenuItem();
    menuWindowOptions = new javax.swing.JCheckBoxMenuItem();
    menuLANDF = new javax.swing.JMenu();
    menuHelp = new javax.swing.JMenu();
    menuHelpAbout = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    setTitle("JHexed Map editor");
    setLocationByPlatform(true);
    setMinimumSize(new java.awt.Dimension(300, 300));
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosed(java.awt.event.WindowEvent evt) {
            formWindowClosed(evt);
        }

        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }
    });

    panelMainArea.setLayout(new java.awt.BorderLayout());

    jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    labelCellUnderMouse.setText("   ");

    labelZoomStatus.setText("   ");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(labelCellUnderMouse)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 705, Short.MAX_VALUE)
                    .addComponent(labelZoomStatus).addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                    jPanel1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(labelCellUnderMouse).addComponent(labelZoomStatus))));

    panelMainArea.add(jPanel1, java.awt.BorderLayout.PAGE_END);

    getContentPane().add(panelMainArea, java.awt.BorderLayout.CENTER);

    menuFile.setText("File");
    menuFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileActionPerformed(evt);
        }
    });

    menuFileNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N,
            java.awt.event.InputEvent.CTRL_MASK));
    menuFileNew.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/igormaznitsa/jhexed/swing/editor/icons/new.png"))); // NOI18N
    menuFileNew.setText("New");
    menuFileNew.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileNewActionPerformed(evt);
        }
    });
    menuFile.add(menuFileNew);

    menuItemFileOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O,
            java.awt.event.InputEvent.CTRL_MASK));
    menuItemFileOpen.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/igormaznitsa/jhexed/swing/editor/icons/folder-open-image.png"))); // NOI18N
    menuItemFileOpen.setText("Open");
    menuItemFileOpen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuItemFileOpenActionPerformed(evt);
        }
    });
    menuFile.add(menuItemFileOpen);

    menuFileSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.event.InputEvent.CTRL_MASK));
    menuFileSave.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/igormaznitsa/jhexed/swing/editor/icons/drive-download.png"))); // NOI18N
    menuFileSave.setText("Save");
    menuFileSave.setEnabled(false);
    menuFileSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileSaveActionPerformed(evt);
        }
    });
    menuFile.add(menuFileSave);

    menuFileSaveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    menuFileSaveAs.setText("Save As...");
    menuFileSaveAs.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileSaveAsActionPerformed(evt);
        }
    });
    menuFile.add(menuFileSaveAs);
    menuFile.add(jSeparator1);

    menuFileExportAs.setText("Export as...");

    menuFileExportAsImage.setText("PNG Image");
    menuFileExportAsImage.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileExportAsImageActionPerformed(evt);
        }
    });
    menuFileExportAs.add(menuFileExportAsImage);

    menuFileExportAsSVG.setText("SVG Image");
    menuFileExportAsSVG.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileExportAsSVGActionPerformed(evt);
        }
    });
    menuFileExportAs.add(menuFileExportAsSVG);

    menuFileExportAsXML.setText("Xml file");
    menuFileExportAsXML.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileExportAsXMLActionPerformed(evt);
        }
    });
    menuFileExportAs.add(menuFileExportAsXML);

    menuFileExportAsJavaConstants.setText("Java constants");
    menuFileExportAsJavaConstants.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileExportAsJavaConstantsActionPerformed(evt);
        }
    });
    menuFileExportAs.add(menuFileExportAsJavaConstants);

    menuFile.add(menuFileExportAs);
    menuFile.add(jSeparator3);

    menuFileDocumentOptions.setText("Document options");
    menuFileDocumentOptions.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileDocumentOptionsActionPerformed(evt);
        }
    });
    menuFile.add(menuFileDocumentOptions);
    menuFile.add(jSeparator4);

    menuFileExit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4,
            java.awt.event.InputEvent.ALT_MASK));
    menuFileExit.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/igormaznitsa/jhexed/swing/editor/icons/door-open-out.png"))); // NOI18N
    menuFileExit.setText("Exit");
    menuFileExit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileExitActionPerformed(evt);
        }
    });
    menuFile.add(menuFileExit);

    menuMain.add(menuFile);

    menuEdit.setText("Edit");

    menuEditUndo.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z,
            java.awt.event.InputEvent.CTRL_MASK));
    menuEditUndo.setText("Undo");
    menuEditUndo.setEnabled(false);
    menuEditUndo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuEditUndoActionPerformed(evt);
        }
    });
    menuEdit.add(menuEditUndo);

    menuEditRedo.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X,
            java.awt.event.InputEvent.CTRL_MASK));
    menuEditRedo.setText("Redo");
    menuEditRedo.setEnabled(false);
    menuEditRedo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuEditRedoActionPerformed(evt);
        }
    });
    menuEdit.add(menuEditRedo);

    menuMain.add(menuEdit);

    menuView.setText("View");

    menuViewZoomIn.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I,
            java.awt.event.InputEvent.CTRL_MASK));
    menuViewZoomIn.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/igormaznitsa/jhexed/swing/editor/icons/magnifier-zoom-in.png"))); // NOI18N
    menuViewZoomIn.setText("Zoom In");
    menuViewZoomIn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuViewZoomInActionPerformed(evt);
        }
    });
    menuView.add(menuViewZoomIn);

    menuViewZoomOut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    menuViewZoomOut.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/igormaznitsa/jhexed/swing/editor/icons/magnifier-zoom-out.png"))); // NOI18N
    menuViewZoomOut.setText("Zoom Out");
    menuViewZoomOut.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuViewZoomOutActionPerformed(evt);
        }
    });
    menuView.add(menuViewZoomOut);

    menuViewZoomReset.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R,
            java.awt.event.InputEvent.CTRL_MASK));
    menuViewZoomReset.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/igormaznitsa/jhexed/swing/editor/icons/magnifier-zoom-actual.png"))); // NOI18N
    menuViewZoomReset.setText("Zoom Reset");
    menuViewZoomReset.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuViewZoomResetActionPerformed(evt);
        }
    });
    menuView.add(menuViewZoomReset);
    menuView.add(jSeparator2);

    menuViewBackImage.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B,
            java.awt.event.InputEvent.CTRL_MASK));
    menuViewBackImage.setSelected(true);
    menuViewBackImage.setText("Show back image");
    menuViewBackImage.setToolTipText("Show/Hide the background image");
    menuViewBackImage.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            menuViewBackImageStateChanged(evt);
        }
    });
    menuView.add(menuViewBackImage);

    menuShowHexBorders.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H,
            java.awt.event.InputEvent.CTRL_MASK));
    menuShowHexBorders.setSelected(true);
    menuShowHexBorders.setText("Show hex borders");
    menuShowHexBorders.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            menuShowHexBordersStateChanged(evt);
        }
    });
    menuView.add(menuShowHexBorders);

    menuMain.add(menuView);

    menuPlugins.setText("Plugins");
    menuMain.add(menuPlugins);

    menuWindow.setText("Window");

    menuWindowLayers.setSelected(true);
    menuWindowLayers.setText("Layers");
    menuWindowLayers.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuWindowLayersActionPerformed(evt);
        }
    });
    menuWindow.add(menuWindowLayers);

    menuWindowTools.setSelected(true);
    menuWindowTools.setText("Tools");
    menuWindowTools.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuWindowToolsActionPerformed(evt);
        }
    });
    menuWindow.add(menuWindowTools);

    menuWindowOptions.setSelected(true);
    menuWindowOptions.setText("Options");
    menuWindowOptions.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuWindowOptionsActionPerformed(evt);
        }
    });
    menuWindow.add(menuWindowOptions);

    menuMain.add(menuWindow);

    menuLANDF.setText("Look&Feel");
    menuMain.add(menuLANDF);

    menuHelp.setText("Help");

    menuHelpAbout.setText("About");
    menuHelpAbout.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuHelpAboutActionPerformed(evt);
        }
    });
    menuHelp.add(menuHelpAbout);

    menuMain.add(menuHelp);

    setJMenuBar(menuMain);

    pack();
}

From source file:com.haulmont.cuba.desktop.sys.DesktopWindowManager.java

protected JDialog showWindowDialog(final Window window, String caption, String description, OpenType openType,
        boolean forciblyDialog) {
    final DialogWindow dialog = new DialogWindow(frame, caption);
    dialog.setName(window.getId());//ww w .  j ava2s . c  o m
    dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

    JComponent jComponent = DesktopComponentsHelper.getComposition(window);
    dialog.add(jComponent);

    dialog.addWindowListener(new ValidationAwareWindowClosingListener() {
        @Override
        public void windowClosingAfterValidation(WindowEvent e) {
            if (BooleanUtils.isNotFalse(window.getDialogOptions().getCloseable())) {
                if (!isCloseWithCloseButtonPrevented(window)) {
                    if (window.close("close")) {
                        dialog.dispose();
                    }
                }
            }
        }
    });

    Dimension dim = new Dimension();
    if (forciblyDialog) {
        // todo move it to desktop application preferences
        dim.width = 800;
        dim.height = 500;

        dialog.setResizable(BooleanUtils.isNotFalse(openType.getResizable()));
        if (!dialog.isResizable()) {
            dialog.setFixedHeight(dim.height);
            dialog.setFixedWidth(dim.width);
        }

        window.setHeight("100%");
    } else {
        dialog.setResizable(BooleanUtils.isTrue(openType.getResizable()));
        if (openType.getWidth() == null) {
            dim.width = 600;
            if (!dialog.isResizable()) {
                dialog.setFixedWidth(dim.width);
            }
        } else if (openType.getWidth() == DialogParams.AUTO_SIZE_PX) {
            window.setWidth(AUTO_SIZE);
        } else {
            if (openType.getWidthUnit() != null && openType.getWidthUnit() != SizeUnit.PIXELS) {
                throw new UnsupportedOperationException("Dialog size can be set only in pixels");
            }
            dim.width = openType.getWidth().intValue();
            if (!dialog.isResizable()) {
                dialog.setFixedWidth(dim.width);
            }
        }

        if (openType.getHeight() != null && openType.getHeight() != DialogParams.AUTO_SIZE_PX) {
            if (openType.getHeightUnit() != null && openType.getHeightUnit() != SizeUnit.PIXELS) {
                throw new UnsupportedOperationException("Dialog size can be set only in pixels");
            }
            dim.height = openType.getHeight().intValue();
            if (!dialog.isResizable()) {
                dialog.setFixedHeight(dim.height);
            }
            window.setHeight("100%");
        } else {
            window.setHeight(AUTO_SIZE);
        }
    }

    getDialogParams().reset();

    dialog.setMinimumSize(dim);
    dialog.pack();

    if (openType.getPositionY() == null && openType.getPositionX() == null) {
        dialog.setLocationRelativeTo(frame);
    } else {
        dialog.setLocation(openType.getPositionX() != null ? openType.getPositionX() : 0,
                openType.getPositionY() != null ? openType.getPositionY() : 0);
    }

    boolean modal = true;
    if (!hasModalWindow() && openType.getModal() != null) {
        modal = openType.getModal();
    }

    if (modal) {
        DialogWindow lastDialogWindow = getLastDialogWindow();
        if (lastDialogWindow == null)
            frame.deactivate(null);
        else
            lastDialogWindow.disableWindow(null);

        dialog.setSoftModal(true);
    }

    dialog.setVisible(true);

    JPopupMenu popupMenu = createWindowPopupMenu(window);
    if (popupMenu.getComponentCount() > 0) {
        jComponent.setComponentPopupMenu(popupMenu);
    }

    return dialog;
}

From source file:net.sf.jabref.gui.JabRefFrame.java

private void init() {
    tabbedPane = new DragDropPopupPane(tabPopupMenu());

    MyGlassPane glassPane = new MyGlassPane();
    setGlassPane(glassPane);/*from w w w  .  jav a2s .c  om*/

    setTitle(FRAME_TITLE);
    setIconImage(new ImageIcon(IconTheme.getIconUrl("jabrefIcon48")).getImage());
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {

            if (OS.OS_X) {
                JabRefFrame.this.setVisible(false);
            } else {
                new CloseAction().actionPerformed(null);
            }
        }
    });

    initSidePane();

    initLayout();

    initActions();

    // Show the toolbar if it was visible at last shutdown:
    tlb.setVisible(Globals.prefs.getBoolean(JabRefPreferences.TOOLBAR_VISIBLE));

    setBounds(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds());
    pw = new PositionWindow(this, JabRefPreferences.POS_X, JabRefPreferences.POS_Y, JabRefPreferences.SIZE_X,
            JabRefPreferences.SIZE_Y);
    positionWindowOnScreen();

    tabbedPane.setBorder(null);
    tabbedPane.setForeground(GUIGlobals.INACTIVE_TABBED_COLOR);

    /*
     * The following state listener makes sure focus is registered with the
     * correct database when the user switches tabs. Without this,
     * cut/paste/copy operations would some times occur in the wrong tab.
     */
    tabbedPane.addChangeListener(e -> {
        markActiveBasePanel();

        BasePanel bp = getCurrentBasePanel();
        if (bp == null) {
            return;
        }

        groupToggle.setSelected(sidePaneManager.isComponentVisible("groups"));
        previewToggle.setSelected(Globals.prefs.getBoolean(JabRefPreferences.PREVIEW_ENABLED));
        fetcherToggle.setSelected(sidePaneManager.isComponentVisible(generalFetcher.getTitle()));
        Globals.getFocusListener().setFocused(bp.getMainTable());
        setWindowTitle();
        editModeAction.initName();
        // Update search autocompleter with information for the correct database:
        bp.updateSearchManager();
        // Set correct enabled state for Back and Forward actions:
        bp.setBackAndForwardEnabledState();
        new FocusRequester(bp.getMainTable());
    });

    //Note: The registration of Apple event is at the end of initialization, because
    //if the events happen too early (ie when the window is not initialized yet), the
    //opened (double-clicked) documents are not displayed.
    if (OS.OS_X) {
        try {
            new MacAdapter().registerMacEvents(this);
        } catch (Exception e) {
            LOGGER.fatal("Could not interface with Mac OS X methods.", e);
        }
    }
}

From source file:com.monead.semantic.workbench.SemanticWorkbench.java

/**
 * Set up the application's UI//  www.j  av a  2 s.co m
 */
public SemanticWorkbench() {
    LOGGER.info("Startup");

    addWindowListener(this);
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    setTitle("Semantic Workbench");
    setIcons();

    loadProperties();

    setupGUI();
    processProperties();

    queryHistory.retrieveHistory(new File(getUserHomeDirectory(), SPARQL_QUERY_HISTORY_FILE_NAME));
    if (queryHistory.getNumberOfQueries() > 0) {
        processSparqlQueryHistoryMove(0);
    }

    enableControls(true);
    pack();
    GuiUtilities.windowSizing(this, properties.getProperty(ConfigurationProperty.LAST_HEIGHT.key()),
            properties.getProperty(ConfigurationProperty.LAST_WIDTH.key()),
            properties.getProperty(ConfigurationProperty.LAST_TOP_X_POSITION.key()),
            properties.getProperty(ConfigurationProperty.LAST_TOP_Y_POSITION.key()));
    setStatus("");
    rdfFileSaved = true;
    sparqlQuerySaved = true;
    setVisible(true);

    checkForNewVersion();
}

From source file:jeplus.JEPlusFrameMain.java

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

    btg = new javax.swing.ButtonGroup();
    rdoExportIndividual = new javax.swing.JRadioButton();
    rdoCombineResults = new javax.swing.JRadioButton();
    rdoTestFirstN = new javax.swing.JRadioButton();
    txtTestFirstN = new javax.swing.JTextField();
    jLabel9 = new javax.swing.JLabel();
    chkLHS = new javax.swing.JCheckBox();
    jSplitPane1 = new javax.swing.JSplitPane();
    tpnMain = new javax.swing.JTabbedPane();
    pnlProject = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    jplTree = new javax.swing.JPanel();
    jplProjectFilesPanelHolder = new javax.swing.JPanel();
    jPanel_EPlusProjectFiles2 = new jeplus.gui.JPanel_EPlusProjectFiles();
    cboProjectType = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();
    cmdValidate = new javax.swing.JButton();
    pnlExecution = new javax.swing.JPanel();
    cboExecutionType = new javax.swing.JComboBox();
    jLabel27 = new javax.swing.JLabel();
    jplSettings = new javax.swing.JPanel();
    jplEPlusSettings = new jeplus.gui.JPanel_EPlusSettings();
    jplOptions = new javax.swing.JPanel();
    jplLocalControllerSettings = new jeplus.gui.JPanel_LocalControllerOptions();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    rdoTestChains = new javax.swing.JRadioButton();
    rdoTestRandomN = new javax.swing.JRadioButton();
    txtTestRandomN = new javax.swing.JTextField();
    jLabel5 = new javax.swing.JLabel();
    txtRandomSeed = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    cmdStart = new javax.swing.JButton();
    rdoJobListFile = new javax.swing.JRadioButton();
    rdoAllJobs = new javax.swing.JRadioButton();
    txtJobListFile = new javax.swing.JTextField();
    cmdSelectJobListFile = new javax.swing.JButton();
    cmdEditJobListFile = new javax.swing.JButton();
    chkOverride = new javax.swing.JCheckBox();
    cboSampleOpt = new javax.swing.JComboBox();
    pnlUtilities = new javax.swing.JPanel();
    TpnUtilities = new javax.swing.JTabbedPane();
    TpnEditors = new javax.swing.JTabbedPane();
    jMenuBarMain = new javax.swing.JMenuBar();
    jMenuFile = new javax.swing.JMenu();
    jMenuItemNew = new javax.swing.JMenuItem();
    jMenuItemOpen = new javax.swing.JMenuItem();
    jMenuRecent = new javax.swing.JMenu();
    jMenuItemSave = new javax.swing.JMenuItem();
    jMenuItemSaveAs = new javax.swing.JMenuItem();
    jSeparator2 = new javax.swing.JSeparator();
    jMenuItemImportJson = new javax.swing.JMenuItem();
    jMenuItemExportJson = new javax.swing.JMenuItem();
    jSeparator10 = new javax.swing.JPopupMenu.Separator();
    jMenuItemOpenTree = new javax.swing.JMenuItem();
    jMenuItemSaveTree = new javax.swing.JMenuItem();
    jSeparator3 = new javax.swing.JSeparator();
    jMenuItemExit = new javax.swing.JMenuItem();
    jMenuEdit = new javax.swing.JMenu();
    jMenuItemImportTable = new javax.swing.JMenuItem();
    jMenuItemExportTable = new javax.swing.JMenuItem();
    jMenuItemResetTree = new javax.swing.JMenuItem();
    jSeparator7 = new javax.swing.JPopupMenu.Separator();
    jMenuItemToRelative = new javax.swing.JMenuItem();
    jMenuItemToAbsolute = new javax.swing.JMenuItem();
    jMenuAction = new javax.swing.JMenu();
    jMenuItemValidate = new javax.swing.JMenuItem();
    jMenuItemSimulate = new javax.swing.JMenuItem();
    jMenuItemPostprocess = new javax.swing.JMenuItem();
    jSeparator6 = new javax.swing.JPopupMenu.Separator();
    jMenuItemMonitor = new javax.swing.JMenuItem();
    jMenuItemStop = new javax.swing.JMenuItem();
    jMenuViewResult = new javax.swing.JMenu();
    jMenuItemViewFolder = new javax.swing.JMenuItem();
    jMenuItemViewIndex = new javax.swing.JMenuItem();
    jMenuItemViewReports = new javax.swing.JMenuItem();
    jSeparator9 = new javax.swing.JPopupMenu.Separator();
    jMenuItemCreateJobList = new javax.swing.JMenuItem();
    jMenuItemCreateIndex = new javax.swing.JMenuItem();
    jSeparator12 = new javax.swing.JPopupMenu.Separator();
    jMenuItemJESSClient = new javax.swing.JMenuItem();
    jMenuItemJEPlusEA = new javax.swing.JMenuItem();
    jMenuTools = new javax.swing.JMenu();
    jMenuItemConfig = new javax.swing.JMenuItem();
    jSeparator4 = new javax.swing.JSeparator();
    jMenuItemViewErr = new javax.swing.JMenuItem();
    jMenuItemViewLog = new javax.swing.JMenuItem();
    jSeparator8 = new javax.swing.JPopupMenu.Separator();
    jMenuItemVersionConverter = new javax.swing.JMenuItem();
    jMenuItemRunPython = new javax.swing.JMenuItem();
    jMenuItemRunReadVars = new javax.swing.JMenuItem();
    jSeparator5 = new javax.swing.JPopupMenu.Separator();
    jMenuItemMemoryUsage = new javax.swing.JMenuItem();
    jMenuItemDefaultLaF = new javax.swing.JMenuItem();
    jMenuItemEditorTheme = new javax.swing.JMenuItem();
    jMenuHelp = new javax.swing.JMenu();
    jMenuItemUserGuide = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JSeparator();
    jMenuItemAbout = new javax.swing.JMenuItem();

    rdoExportIndividual.setText("Export individual results as: [job-id]_");
    rdoExportIndividual.setEnabled(false);
    rdoExportIndividual.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rdoExportIndividualActionPerformed(evt);
        }
    });

    rdoCombineResults.setSelected(true);
    rdoCombineResults.setText("Assemble results into CSV");
    rdoCombineResults.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rdoCombineResultsActionPerformed(evt);
        }
    });

    btg.add(rdoTestFirstN);
    rdoTestFirstN.setText("The first ");
    rdoTestFirstN.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rdoTestFirstNActionPerformed(evt);
        }
    });

    txtTestFirstN.setText("10");
    txtTestFirstN.setEnabled(false);

    jLabel9.setText("jobs");

    chkLHS.setText("LHS");
    chkLHS.setEnabled(false);
    chkLHS.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            chkLHSActionPerformed(evt);
        }
    });

    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    setMinimumSize(new java.awt.Dimension(1000, 740));
    setPreferredSize(new java.awt.Dimension(1200, 760));
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }
    });

    jSplitPane1.setBorder(null);
    jSplitPane1.setDividerLocation(580);
    jSplitPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    jSplitPane1.setOpaque(false);
    jSplitPane1.setPreferredSize(new java.awt.Dimension(1024, 719));

    tpnMain.setToolTipText("Project specifications / Execution settings / optional Post process");
    tpnMain.setPreferredSize(new java.awt.Dimension(450, 708));
    tpnMain.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            tpnMainStateChanged(evt);
        }
    });

    pnlProject.setPreferredSize(new java.awt.Dimension(450, 688));

    jplTree.setBorder(javax.swing.BorderFactory.createTitledBorder("Parameter Tree"));
    jplTree.setLayout(new java.awt.BorderLayout());

    javax.swing.GroupLayout jplProjectFilesPanelHolderLayout = new javax.swing.GroupLayout(
            jplProjectFilesPanelHolder);
    jplProjectFilesPanelHolder.setLayout(jplProjectFilesPanelHolderLayout);
    jplProjectFilesPanelHolderLayout.setHorizontalGroup(jplProjectFilesPanelHolderLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
                    jPanel_EPlusProjectFiles2, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE));
    jplProjectFilesPanelHolderLayout.setVerticalGroup(
            jplProjectFilesPanelHolderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel_EPlusProjectFiles2, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jplProjectFilesPanelHolder, javax.swing.GroupLayout.DEFAULT_SIZE,
                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                    jPanel1Layout.createSequentialGroup().addContainerGap()
                            .addComponent(jplTree, javax.swing.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE)
                            .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addComponent(jplProjectFilesPanelHolder, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jplTree, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE)
                    .addContainerGap()));

    cboProjectType.setModel(new javax.swing.DefaultComboBoxModel(
            new String[] { "EnergyPlus Project", "TRNSYS Project", "INSEL Project" }));
    cboProjectType.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cboProjectTypeActionPerformed(evt);
        }
    });

    jLabel2.setText("Select Project type:");

    cmdValidate.setText("Validate project");
    cmdValidate.setToolTipText("Validate the configuration");
    cmdValidate.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cmdValidateActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout pnlProjectLayout = new javax.swing.GroupLayout(pnlProject);
    pnlProject.setLayout(pnlProjectLayout);
    pnlProjectLayout.setHorizontalGroup(pnlProjectLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlProjectLayout.createSequentialGroup()
                    .addContainerGap().addComponent(jLabel2)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(cboProjectType, javax.swing.GroupLayout.PREFERRED_SIZE, 161,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)
                    .addComponent(cmdValidate).addContainerGap()));
    pnlProjectLayout.setVerticalGroup(pnlProjectLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlProjectLayout.createSequentialGroup().addContainerGap().addGroup(pnlProjectLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cboProjectType, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2).addComponent(cmdValidate))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel1,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)));

    tpnMain.addTab("Project", pnlProject);

    pnlExecution.setPreferredSize(new java.awt.Dimension(500, 688));

    cboExecutionType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Local batch controller",
            "Offline PBS script generator", "Local PBS controller", "JEPlusPlus Job Server (PBS only)",
            "JEPlusPlus Job Server (Windows only)", "JEPlusPlus Job Server" }));
    cboExecutionType.setToolTipText("Select execution type here");
    cboExecutionType.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cboExecutionTypeActionPerformed(evt);
        }
    });

    jLabel27.setText("Select execution controller: ");

    jplSettings.setBorder(javax.swing.BorderFactory.createTitledBorder("Executables"));
    jplSettings.setLayout(new java.awt.BorderLayout());
    jplSettings.add(jplEPlusSettings, java.awt.BorderLayout.CENTER);

    jplOptions.setBorder(javax.swing.BorderFactory.createTitledBorder("Options"));
    jplOptions.setLayout(new java.awt.BorderLayout());
    jplOptions.add(jplLocalControllerSettings, java.awt.BorderLayout.CENTER);

    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Actions"));

    btg.add(rdoTestChains);
    rdoTestChains.setSelected(true);
    rdoTestChains.setText("The first job of each parameter chain (see validation report for parameter chains)");
    rdoTestChains.setToolTipText(
            "This option is for testing jobs only. The job IDs it uses may be different to other modes.");
    rdoTestChains.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rdoTestChainsActionPerformed(evt);
        }
    });

    btg.add(rdoTestRandomN);
    rdoTestRandomN.setText("A random sample of ");
    rdoTestRandomN.setToolTipText("Run a random sample of the whole project.");
    rdoTestRandomN.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rdoTestRandomNActionPerformed(evt);
        }
    });

    txtTestRandomN.setText("1000");
    txtTestRandomN.setToolTipText("Sample size");
    txtTestRandomN.setEnabled(false);

    jLabel5.setText(" jobs, using: ");

    txtRandomSeed.setText("12345");
    txtRandomSeed.setToolTipText(
            "Set a random seed to fix the job sequence. If a negative value is specified, the current time is used as the seed.");
    txtRandomSeed.setEnabled(false);

    jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
    jLabel4.setText("Random Seed:");

    cmdStart.setText("Run Batch");
    cmdStart.setToolTipText("Start batch simulation");
    cmdStart.setActionCommand("start");
    cmdStart.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cmdStartActionPerformed(evt);
        }
    });

    btg.add(rdoJobListFile);
    rdoJobListFile.setText("Job list in file: ");
    rdoJobListFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rdoJobListFileActionPerformed(evt);
        }
    });

    btg.add(rdoAllJobs);
    rdoAllJobs.setText("All jobs");
    rdoAllJobs.setToolTipText("This option will start ALL jobs in the project.");
    rdoAllJobs.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rdoAllJobsActionPerformed(evt);
        }
    });

    txtJobListFile.setText("jobs.csv");
    txtJobListFile.setToolTipText("For the format of a job list file, please refer to the users manual.");
    txtJobListFile.setEnabled(false);

    cmdSelectJobListFile.setText("...");
    cmdSelectJobListFile.setToolTipText("Select a job list file");
    cmdSelectJobListFile.setEnabled(false);
    cmdSelectJobListFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cmdSelectJobListFileActionPerformed(evt);
        }
    });

    cmdEditJobListFile
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_white_edit.png"))); // NOI18N
    cmdEditJobListFile.setToolTipText("Edit the contents of the file");
    cmdEditJobListFile.setEnabled(false);
    cmdEditJobListFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cmdEditJobListFileActionPerformed(evt);
        }
    });

    chkOverride.setSelected(true);
    chkOverride.setText("Override existing results");
    chkOverride.setToolTipText(
            "If unchecked, jEPlus will skip the cases whose results are already present in the output folder.");
    chkOverride.setEnabled(false);

    cboSampleOpt.setModel(
            new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    cboSampleOpt.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cboSampleOptActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap().addGroup(jPanel4Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rdoTestChains, javax.swing.GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE)
                    .addGroup(jPanel4Layout.createSequentialGroup().addComponent(rdoTestRandomN)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(txtTestRandomN, javax.swing.GroupLayout.PREFERRED_SIZE, 47,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel5)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(cboSampleOpt, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addGap(18, 18, 18).addComponent(jLabel4)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txtRandomSeed, javax.swing.GroupLayout.PREFERRED_SIZE, 81,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup().addComponent(rdoJobListFile)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(txtJobListFile)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(cmdSelectJobListFile, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(cmdEditJobListFile, javax.swing.GroupLayout.PREFERRED_SIZE, 28,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(rdoAllJobs, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                            .addComponent(chkOverride, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGap(18, 18, 18).addComponent(cmdStart, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    130, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap()));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup().addComponent(rdoTestChains)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(rdoTestRandomN)
                            .addComponent(txtTestRandomN, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtRandomSeed, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4).addComponent(jLabel5).addComponent(cboSampleOpt,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(rdoJobListFile).addComponent(txtJobListFile,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(cmdSelectJobListFile, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cmdEditJobListFile))
                    .addGap(7, 7, 7).addComponent(rdoAllJobs).addGap(18, 18, 18)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cmdStart).addComponent(chkOverride))
                    .addContainerGap(115, Short.MAX_VALUE)));

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addComponent(jPanel4,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addComponent(jPanel4,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    javax.swing.GroupLayout pnlExecutionLayout = new javax.swing.GroupLayout(pnlExecution);
    pnlExecution.setLayout(pnlExecutionLayout);
    pnlExecutionLayout.setHorizontalGroup(pnlExecutionLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlExecutionLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(pnlExecutionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                    pnlExecutionLayout.createSequentialGroup().addComponent(jLabel27)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(cboExecutionType, 0,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addComponent(jplSettings, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                            .addComponent(jplOptions, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
                                    Short.MAX_VALUE))
                    .addContainerGap()));
    pnlExecutionLayout.setVerticalGroup(pnlExecutionLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlExecutionLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlExecutionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cboExecutionType, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel27))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jplSettings, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jplOptions, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    tpnMain.addTab("Execution", pnlExecution);

    javax.swing.GroupLayout pnlUtilitiesLayout = new javax.swing.GroupLayout(pnlUtilities);
    pnlUtilities.setLayout(pnlUtilitiesLayout);
    pnlUtilitiesLayout
            .setHorizontalGroup(
                    pnlUtilitiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlUtilitiesLayout
                                    .createSequentialGroup().addContainerGap().addComponent(TpnUtilities,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE)
                                    .addContainerGap()));
    pnlUtilitiesLayout.setVerticalGroup(pnlUtilitiesLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlUtilitiesLayout.createSequentialGroup().addContainerGap()
                    .addComponent(TpnUtilities, javax.swing.GroupLayout.DEFAULT_SIZE, 669, Short.MAX_VALUE)
                    .addContainerGap()));

    tpnMain.addTab("Utilities", pnlUtilities);

    jSplitPane1.setLeftComponent(tpnMain);

    TpnEditors.setMaximumSize(new java.awt.Dimension(900, 1200));
    TpnEditors.setPreferredSize(null);
    jSplitPane1.setRightComponent(TpnEditors);
    TpnEditors.getAccessibleContext().setAccessibleName("Information");

    jMenuFile.setText("File");

    jMenuItemNew
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_white_add.png"))); // NOI18N
    jMenuItemNew.setText("New");
    jMenuItemNew.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemNewActionPerformed(evt);
        }
    });
    jMenuFile.add(jMenuItemNew);

    jMenuItemOpen
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/folder_explore.png"))); // NOI18N
    jMenuItemOpen.setText("Open ...");
    jMenuItemOpen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemOpenActionPerformed(evt);
        }
    });
    jMenuFile.add(jMenuItemOpen);

    jMenuRecent.setText("Open recent");
    jMenuFile.add(jMenuRecent);

    jMenuItemSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/save1.png"))); // NOI18N
    jMenuItemSave.setText("Save ");
    jMenuItemSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemSaveActionPerformed(evt);
        }
    });
    jMenuFile.add(jMenuItemSave);

    jMenuItemSaveAs.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/disk.png"))); // NOI18N
    jMenuItemSaveAs.setText("Save as ... ");
    jMenuItemSaveAs.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemSaveAsActionPerformed(evt);
        }
    });
    jMenuFile.add(jMenuItemSaveAs);
    jMenuFile.add(jSeparator2);

    jMenuItemImportJson
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/view_as_json.png"))); // NOI18N
    jMenuItemImportJson.setText("Import JSON project ...");
    jMenuItemImportJson.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemImportJsonActionPerformed(evt);
        }
    });
    jMenuFile.add(jMenuItemImportJson);

    jMenuItemExportJson
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/view_as_json.png"))); // NOI18N
    jMenuItemExportJson.setText("Export JSON project ...");
    jMenuItemExportJson.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemExportJsonActionPerformed(evt);
        }
    });
    jMenuFile.add(jMenuItemExportJson);
    jMenuFile.add(jSeparator10);

    jMenuItemOpenTree
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_white_get.png"))); // NOI18N
    jMenuItemOpenTree.setText("Import jE+ v0.5 OBJ file ...");
    jMenuItemOpenTree
            .setToolTipText("Import contents of an .obj file (including v0.5 objs) into this project.");
    jMenuItemOpenTree.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemOpenTreeActionPerformed(evt);
        }
    });
    jMenuFile.add(jMenuItemOpenTree);

    jMenuItemSaveTree
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_white_put.png"))); // NOI18N
    jMenuItemSaveTree.setText("Export jE+ v0.5 OBJ file ...");
    jMenuItemSaveTree.setToolTipText("Export the current project to an .obj file.");
    jMenuItemSaveTree.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemSaveTreeActionPerformed(evt);
        }
    });
    jMenuFile.add(jMenuItemSaveTree);
    jMenuFile.add(jSeparator3);

    jMenuItemExit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/cross.png"))); // NOI18N
    jMenuItemExit.setText("Exit");
    jMenuItemExit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemExitActionPerformed(evt);
        }
    });
    jMenuFile.add(jMenuItemExit);

    jMenuBarMain.add(jMenuFile);

    jMenuEdit.setText("Edit");

    jMenuItemImportTable
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_white_get.png"))); // NOI18N
    jMenuItemImportTable.setText("Import parameters from CSV ...");
    jMenuItemImportTable.setToolTipText("Import parameter definitions from a CSV table.");
    jMenuItemImportTable.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemImportTableActionPerformed(evt);
        }
    });
    jMenuEdit.add(jMenuItemImportTable);

    jMenuItemExportTable
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_white_go.png"))); // NOI18N
    jMenuItemExportTable.setText("Export parameters to CSV ...");
    jMenuItemExportTable.setToolTipText("Export parameters in this project to a CSV table");
    jMenuItemExportTable.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemExportTableActionPerformed(evt);
        }
    });
    jMenuEdit.add(jMenuItemExportTable);

    jMenuItemResetTree.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/cross.png"))); // NOI18N
    jMenuItemResetTree.setText("Reset parameter tree");
    jMenuItemResetTree.setToolTipText("Clear the parameter tree");
    jMenuItemResetTree.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemResetTreeActionPerformed(evt);
        }
    });
    jMenuEdit.add(jMenuItemResetTree);
    jMenuEdit.add(jSeparator7);

    jMenuItemToRelative
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/document-save.png"))); // NOI18N
    jMenuItemToRelative.setText("Change all paths to relative form");
    jMenuItemToRelative.setToolTipText(
            "Change paths in the project to a relative form relative to the location of the project file.");
    jMenuItemToRelative.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemToRelativeActionPerformed(evt);
        }
    });
    jMenuEdit.add(jMenuItemToRelative);

    jMenuItemToAbsolute
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/document-save-as.png"))); // NOI18N
    jMenuItemToAbsolute.setText("Change all paths to absolute form");
    jMenuItemToAbsolute.setToolTipText("Change the path to absolute form.");
    jMenuItemToAbsolute.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemToAbsoluteActionPerformed(evt);
        }
    });
    jMenuEdit.add(jMenuItemToAbsolute);

    jMenuBarMain.add(jMenuEdit);

    jMenuAction.setText("Action");

    jMenuItemValidate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/check.png"))); // NOI18N
    jMenuItemValidate.setText("Validate jobs");
    jMenuItemValidate.setToolTipText("Validate the current project and count jobs.");
    jMenuItemValidate.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemValidateActionPerformed(evt);
        }
    });
    jMenuAction.add(jMenuItemValidate);

    jMenuItemSimulate
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/lightening2.png"))); // NOI18N
    jMenuItemSimulate.setText("Simulate ");
    jMenuItemSimulate.setToolTipText("Start simulation.");
    jMenuItemSimulate.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemSimulateActionPerformed(evt);
        }
    });
    jMenuAction.add(jMenuItemSimulate);

    jMenuItemPostprocess.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/chart.png"))); // NOI18N
    jMenuItemPostprocess.setText("Post-process");
    jMenuItemPostprocess.setToolTipText("Go to the post process / utilities tab");
    jMenuItemPostprocess.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemPostprocessActionPerformed1(evt);
        }
    });
    jMenuAction.add(jMenuItemPostprocess);
    jMenuAction.add(jSeparator6);

    jMenuItemMonitor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/tool.png"))); // NOI18N
    jMenuItemMonitor.setText("Show Monitor");
    jMenuItemMonitor.setToolTipText("Show simulation monitor.");
    jMenuItemMonitor.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemMonitorActionPerformed(evt);
        }
    });
    jMenuAction.add(jMenuItemMonitor);

    jMenuItemStop.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/cross.png"))); // NOI18N
    jMenuItemStop.setText("Stop Simulation");
    jMenuItemStop.setToolTipText("Cancel the current simulation jobs.");
    jMenuItemStop.setEnabled(false);
    jMenuItemStop.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemStopActionPerformed(evt);
        }
    });
    jMenuAction.add(jMenuItemStop);

    jMenuViewResult.setText("View results");
    jMenuViewResult.setToolTipText("View result folder and files");
    jMenuViewResult.setEnabled(false);

    jMenuItemViewFolder
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/folder_explore.png"))); // NOI18N
    jMenuItemViewFolder.setText("Go to output folder");
    jMenuItemViewFolder.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemViewFolderActionPerformed(evt);
        }
    });
    jMenuViewResult.add(jMenuItemViewFolder);

    jMenuItemViewIndex.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_white_magnify.png"))); // NOI18N
    jMenuItemViewIndex.setText("View Job Index (JobIndex.csv)");
    jMenuItemViewIndex.setActionCommand("View Job Index (SimJobIndex.csv)");
    jMenuItemViewIndex.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemViewIndexActionPerformed(evt);
        }
    });
    jMenuViewResult.add(jMenuItemViewIndex);

    jMenuItemViewReports.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_white_magnify.png"))); // NOI18N
    jMenuItemViewReports.setText("View Simulation Reports (RunTimes.csv)");
    jMenuItemViewReports.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemViewReportsActionPerformed(evt);
        }
    });
    jMenuViewResult.add(jMenuItemViewReports);

    jMenuAction.add(jMenuViewResult);
    jMenuAction.add(jSeparator9);

    jMenuItemCreateJobList
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_key.png"))); // NOI18N
    jMenuItemCreateJobList.setText("Create the full job list...");
    jMenuItemCreateJobList.setToolTipText(
            "Create the list of jobs in the current project and save it in a CSV file. This list or part of it can be used as a job list file in the future.");
    jMenuItemCreateJobList.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemCreateJobListActionPerformed(evt);
        }
    });
    jMenuAction.add(jMenuItemCreateJobList);

    jMenuItemCreateIndex
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_white_key.png"))); // NOI18N
    jMenuItemCreateIndex.setText("Create parameter indexes");
    jMenuItemCreateIndex.setToolTipText("Create index tables for the parameters in this project.");
    jMenuItemCreateIndex.setEnabled(false);
    jMenuItemCreateIndex.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemCreateIndexActionPerformed(evt);
        }
    });
    jMenuAction.add(jMenuItemCreateIndex);
    jMenuAction.add(jSeparator12);

    jMenuItemJESSClient.setText("Launch JESS Client");
    jMenuItemJESSClient.setEnabled(false);
    jMenuItemJESSClient.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemJESSClientActionPerformed(evt);
        }
    });
    jMenuAction.add(jMenuItemJESSClient);

    jMenuItemJEPlusEA.setText("Launch jEPlus+EA");
    jMenuItemJEPlusEA.setEnabled(false);
    jMenuItemJEPlusEA.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemJEPlusEAActionPerformed(evt);
        }
    });
    jMenuAction.add(jMenuItemJEPlusEA);

    jMenuBarMain.add(jMenuAction);

    jMenuTools.setText("Tools ");

    jMenuItemConfig.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/hammer_screwdriver.png"))); // NOI18N
    jMenuItemConfig.setText("Configure External Programs ...");
    jMenuItemConfig.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemConfigActionPerformed(evt);
        }
    });
    jMenuTools.add(jMenuItemConfig);
    jMenuTools.add(jSeparator4);

    jMenuItemViewErr.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/bug.png"))); // NOI18N
    jMenuItemViewErr.setText("View jEPlus error log (jeplus.err)");
    jMenuItemViewErr.setToolTipText("Open jeplus.err file to check errors.");
    jMenuItemViewErr.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemViewErrActionPerformed(evt);
        }
    });
    jMenuTools.add(jMenuItemViewErr);

    jMenuItemViewLog.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/bug.png"))); // NOI18N
    jMenuItemViewLog.setText("View E+ console log (console.log)");
    jMenuItemViewLog.setEnabled(false);
    jMenuItemViewLog.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemViewLogActionPerformed(evt);
        }
    });
    jMenuTools.add(jMenuItemViewLog);
    jMenuTools.add(jSeparator8);

    jMenuItemVersionConverter
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/go-up.png"))); // NOI18N
    jMenuItemVersionConverter.setText("IDF Version Converter ...");
    jMenuItemVersionConverter.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemVersionConverterActionPerformed(evt);
        }
    });
    jMenuTools.add(jMenuItemVersionConverter);

    jMenuItemRunPython
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/16px-Icon-Python.png"))); // NOI18N
    jMenuItemRunPython.setText("Run Python script ...");
    jMenuItemRunPython.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemRunPythonActionPerformed(evt);
        }
    });
    jMenuTools.add(jMenuItemRunPython);

    jMenuItemRunReadVars
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/edit-clear.png"))); // NOI18N
    jMenuItemRunReadVars.setText("Run ReadVars ...");
    jMenuItemRunReadVars.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemRunReadVarsActionPerformed(evt);
        }
    });
    jMenuTools.add(jMenuItemRunReadVars);
    jMenuTools.add(jSeparator5);

    jMenuItemMemoryUsage
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/ddr_memory.png"))); // NOI18N
    jMenuItemMemoryUsage.setText("Memory Usage");
    jMenuItemMemoryUsage.setToolTipText("Show memory usage dialog to check available resources");
    jMenuItemMemoryUsage.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemMemoryUsageActionPerformed(evt);
        }
    });
    jMenuTools.add(jMenuItemMemoryUsage);

    jMenuItemDefaultLaF.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/jeplus/images/preferences-desktop-wallpaper.png"))); // NOI18N
    jMenuItemDefaultLaF.setText("Switch to defaul Look and Feel (Metal)");
    jMenuItemDefaultLaF.setToolTipText("Change GUI style");
    jMenuItemDefaultLaF.setActionCommand("default");
    jMenuItemDefaultLaF.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemDefaultLaFActionPerformed(evt);
        }
    });
    jMenuTools.add(jMenuItemDefaultLaF);

    jMenuItemEditorTheme
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/page_gear.png"))); // NOI18N
    jMenuItemEditorTheme.setText("Edit syntax highlighting theme");
    jMenuItemEditorTheme.setToolTipText("The syntax highlighting style can be edited to your preference.");
    jMenuItemEditorTheme.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemEditorThemeActionPerformed(evt);
        }
    });
    jMenuTools.add(jMenuItemEditorTheme);

    jMenuBarMain.add(jMenuTools);

    jMenuHelp.setText("Help");

    jMenuItemUserGuide.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItemUserGuide.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/bulb.png"))); // NOI18N
    jMenuItemUserGuide.setText("User's Guide Online");
    jMenuItemUserGuide.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemUserGuideActionPerformed(evt);
        }
    });
    jMenuHelp.add(jMenuItemUserGuide);
    jMenuHelp.add(jSeparator1);

    jMenuItemAbout.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItemAbout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jeplus/images/mail.png"))); // NOI18N
    jMenuItemAbout.setText("About");
    jMenuItemAbout.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemAboutActionPerformed(evt);
        }
    });
    jMenuHelp.add(jMenuItemAbout);

    jMenuBarMain.add(jMenuHelp);

    setJMenuBar(jMenuBarMain);

    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()
                    .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 989, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jSplitPane1,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    pack();
}