Example usage for javax.swing WindowConstants EXIT_ON_CLOSE

List of usage examples for javax.swing WindowConstants EXIT_ON_CLOSE

Introduction

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

Prototype

int EXIT_ON_CLOSE

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

Click Source Link

Document

The exit application default window close operation.

Usage

From source file:com.raceup.fsae.test.TesterGui.java

/**
 * setups gui
 */
private void setup() {
    setupMenubar();
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}

From source file:layout.Find.java

public Find() {
    JLabel label = new JLabel("Find What:");
    ;/*from  w w w.  jav a  2 s.com*/
    JTextField textField = new JTextField();
    JCheckBox caseCheckBox = new JCheckBox("Match Case");
    JCheckBox wrapCheckBox = new JCheckBox("Wrap Around");
    JCheckBox wholeCheckBox = new JCheckBox("Whole Words");
    JCheckBox backCheckBox = new JCheckBox("Search Backwards");
    JButton findButton = new JButton("Find");
    JButton cancelButton = new JButton("Cancel");

    // remove redundant default border of check boxes - they would hinder
    // correct spacing and aligning (maybe not needed on some look and feels)
    caseCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    wrapCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    wholeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    backCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);

    layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(label)
            .addGroup(layout.createParallelGroup(LEADING).addComponent(textField)
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(LEADING).addComponent(caseCheckBox)
                                    .addComponent(wholeCheckBox))
                            .addGroup(layout.createParallelGroup(LEADING).addComponent(wrapCheckBox)
                                    .addComponent(backCheckBox))))
            .addGroup(layout.createParallelGroup(LEADING).addComponent(findButton).addComponent(cancelButton)));

    layout.linkSize(SwingConstants.HORIZONTAL, findButton, cancelButton);

    layout.setVerticalGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(BASELINE).addComponent(label).addComponent(textField)
                    .addComponent(findButton))
            .addGroup(layout.createParallelGroup(LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(BASELINE).addComponent(caseCheckBox)
                                    .addComponent(wrapCheckBox))
                            .addGroup(layout.createParallelGroup(BASELINE).addComponent(wholeCheckBox)
                                    .addComponent(backCheckBox)))
                    .addComponent(cancelButton)));

    setTitle("Find");
    pack();
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}

From source file:lookandfeel.SynthDialog.java

public SynthDialog() {
    JLabel label = new JLabel("Find What:");
    ;//from   w  w  w  .  ja v  a 2 s  .co m
    JTextField textField = new JTextField();
    JCheckBox caseCheckBox = new JCheckBox("Match Case");
    JCheckBox wrapCheckBox = new JCheckBox("Wrap Around");
    JCheckBox wholeCheckBox = new JCheckBox("Whole Words");
    JCheckBox backCheckBox = new JCheckBox("Search Backwards");
    JButton findButton = new JButton("Find");
    JButton cancelButton = new JButton("Cancel");

    // remove redundant default border of check boxes - they would hinder
    // correct spacing and aligning (maybe not needed on some look and feels)
    caseCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    wrapCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    wholeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    backCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);

    layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(label)
            .addGroup(layout.createParallelGroup(LEADING).addComponent(textField)
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(LEADING).addComponent(caseCheckBox)
                                    .addComponent(wholeCheckBox))
                            .addGroup(layout.createParallelGroup(LEADING).addComponent(wrapCheckBox)
                                    .addComponent(backCheckBox))))
            .addGroup(layout.createParallelGroup(LEADING).addComponent(findButton).addComponent(cancelButton)));

    layout.linkSize(SwingConstants.HORIZONTAL, findButton, cancelButton);

    layout.setVerticalGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(BASELINE).addComponent(label).addComponent(textField)
                    .addComponent(findButton))
            .addGroup(layout.createParallelGroup(LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(BASELINE).addComponent(caseCheckBox)
                                    .addComponent(wrapCheckBox))
                            .addGroup(layout.createParallelGroup(BASELINE).addComponent(wholeCheckBox)
                                    .addComponent(backCheckBox)))
                    .addComponent(cancelButton)));

    setTitle("Find");
    pack();
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}

From source file:lookandfeel.SynthDialog.java

public SynthDialog() {
   JLabel label = new JLabel("Find What:");;
    JTextField textField = new JTextField();
    JCheckBox caseCheckBox = new JCheckBox("Match Case");
    JCheckBox wrapCheckBox = new JCheckBox("Wrap Around");
    JCheckBox wholeCheckBox = new JCheckBox("Whole Words");
    JCheckBox backCheckBox = new JCheckBox("Search Backwards");
    JButton findButton = new JButton("Find");
    JButton cancelButton = new JButton("Cancel");

    // remove redundant default border of check boxes - they would hinder
    // correct spacing and aligning (maybe not needed on some look and feels)
    caseCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    wrapCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    wholeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    backCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);// w w w . j av  a 2  s.  c o  m
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);

    layout.setHorizontalGroup(layout.createSequentialGroup()
        .addComponent(label)
        .addGroup(layout.createParallelGroup(LEADING)
            .addComponent(textField)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(LEADING)
                    .addComponent(caseCheckBox)
                    .addComponent(wholeCheckBox))
                .addGroup(layout.createParallelGroup(LEADING)
                    .addComponent(wrapCheckBox)
                    .addComponent(backCheckBox))))
        .addGroup(layout.createParallelGroup(LEADING)
            .addComponent(findButton)
            .addComponent(cancelButton))
    );
       
    layout.linkSize(SwingConstants.HORIZONTAL, findButton, cancelButton);

    layout.setVerticalGroup(layout.createSequentialGroup()
        .addGroup(layout.createParallelGroup(BASELINE)
            .addComponent(label)
            .addComponent(textField)
            .addComponent(findButton))
        .addGroup(layout.createParallelGroup(LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(BASELINE)
                    .addComponent(caseCheckBox)
                    .addComponent(wrapCheckBox))
                .addGroup(layout.createParallelGroup(BASELINE)
                    .addComponent(wholeCheckBox)
                    .addComponent(backCheckBox)))
            .addComponent(cancelButton))
    );

    setTitle("Find");
    pack();
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}

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

    comboAlgo = new javax.swing.JComboBox();
    buttonOk = new javax.swing.JButton();
    imageLabel = new javax.swing.JLabel();
    labelExecutionTime = new javax.swing.JLabel();
    labelExecutionOutput = new javax.swing.JLabel();
    labelExecution = new javax.swing.JLabel();
    labelExecutionTimeElapsed = new javax.swing.JLabel();
    btnPlot = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setPreferredSize(new java.awt.Dimension(450, 450));

    comboAlgo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select Algorithm",
            "Binary Search Merge Sort", "Interpolation Search Merge Sort", "Normal Merge Sort", "Tan Sort" }));
    comboAlgo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            comboAlgoActionPerformed(evt);
        }
    });

    buttonOk.setText("Run");
    buttonOk.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonOkActionPerformed(evt);
        }
    });

    labelExecutionTime.setText("Time Elapsed :");
    labelExecutionTime.setToolTipText("");

    labelExecution.setText("Execution :");

    btnPlot.setText("Plot");
    btnPlot.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnPlotActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(30, 30, 30)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(labelExecution, javax.swing.GroupLayout.PREFERRED_SIZE, 61,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(41, 41, 41).addComponent(labelExecutionOutput,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup().addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                            .addComponent(labelExecutionTime,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 97,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(labelExecutionTimeElapsed,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 159,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 340,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addContainerGap())
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(comboAlgo, javax.swing.GroupLayout.PREFERRED_SIZE, 219,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(buttonOk)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(btnPlot).addGap(0, 0, Short.MAX_VALUE)))));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(18, 18, 18).addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboAlgo, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonOk).addComponent(btnPlot))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 250,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(labelExecution, javax.swing.GroupLayout.DEFAULT_SIZE, 29,
                                    Short.MAX_VALUE)
                            .addComponent(labelExecutionOutput, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(labelExecutionTime, javax.swing.GroupLayout.DEFAULT_SIZE, 29,
                                    Short.MAX_VALUE)
                            .addComponent(labelExecutionTimeElapsed, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap()));

    pack();
}

From source file:misc.DesktopDemo.java

/** Create and show components
 *//*  ww  w  .  j  a  v a2  s  .co  m*/
private void initComponents() {

    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    setTitle("DesktopDemo");
    txtBrowserURI.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            onLaunchBrowser(null);
        }
    });

    btnLaunchBrowser.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            onLaunchBrowser(evt);
        }
    });

    txtMailTo.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            onLaunchMail(null);
        }
    });

    btnLaunchEmail.setText("Launch Mail");
    btnLaunchEmail.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            onLaunchMail(evt);
        }
    });

    txtFile.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            onLaunchDefaultApplication(null);
        }
    });

    rbOpen.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            onOpenAction(evt);
        }
    });

    rbEdit.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            onEditAction(evt);
        }
    });

    rbPrint.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            onPrintAction(evt);
        }
    });

    btnLaunchApplication.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            onLaunchDefaultApplication(evt);
        }
    });

    btnFile.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            onChooseFile(evt);
        }
    });

    Container conFrame = this.getContentPane();

    bgAppAction.add(rbOpen);
    bgAppAction.add(rbEdit);
    bgAppAction.add(rbPrint);

    // Components layouting

    GroupLayout layout = new GroupLayout(conFrame);
    conFrame.setLayout(layout);
    layout.setAutoCreateContainerGaps(true);
    layout.setAutoCreateGaps(true);

    GroupLayout.SequentialGroup majorHGroup = layout.createSequentialGroup();

    // Horizontal group

    GroupLayout.ParallelGroup lblHGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING);
    lblHGroup.addComponent(lblBrowserUri, GroupLayout.Alignment.TRAILING);
    lblHGroup.addComponent(lblMailRecipient, GroupLayout.Alignment.TRAILING);
    lblHGroup.addComponent(lblFile, GroupLayout.Alignment.TRAILING);

    GroupLayout.ParallelGroup txtFieldsHGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING);
    txtFieldsHGroup.addComponent(txtMailTo);
    txtFieldsHGroup.addComponent(txtBrowserURI);
    GroupLayout.SequentialGroup rbHGroup = layout.createSequentialGroup();
    rbHGroup.addComponent(rbOpen);
    rbHGroup.addComponent(rbEdit);
    rbHGroup.addComponent(rbPrint);
    txtFieldsHGroup.addGroup(rbHGroup);
    GroupLayout.SequentialGroup fileHGroup = layout.createSequentialGroup();
    fileHGroup.addComponent(txtFile);
    fileHGroup.addComponent(btnFile);
    txtFieldsHGroup.addGroup(fileHGroup);

    GroupLayout.ParallelGroup btnHGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING);
    btnHGroup.addComponent(btnLaunchBrowser);
    btnHGroup.addComponent(btnLaunchEmail);
    btnHGroup.addComponent(btnLaunchApplication);

    majorHGroup.addGroup(lblHGroup);
    majorHGroup.addGroup(txtFieldsHGroup);
    majorHGroup.addGroup(btnHGroup);

    layout.setHorizontalGroup(majorHGroup);

    // Vertical group

    GroupLayout.SequentialGroup majorVGroup = layout.createSequentialGroup();

    GroupLayout.ParallelGroup uriVGroup = layout.createParallelGroup(GroupLayout.Alignment.BASELINE);
    uriVGroup.addComponent(lblBrowserUri);
    uriVGroup.addComponent(txtBrowserURI);
    uriVGroup.addComponent(btnLaunchBrowser);

    GroupLayout.ParallelGroup mailVGroup = layout.createParallelGroup(GroupLayout.Alignment.BASELINE);
    mailVGroup.addComponent(lblMailRecipient);
    mailVGroup.addComponent(txtMailTo);
    mailVGroup.addComponent(btnLaunchEmail);

    GroupLayout.ParallelGroup rbVGroup = layout.createParallelGroup(GroupLayout.Alignment.BASELINE);
    rbVGroup.addComponent(rbOpen);
    rbVGroup.addComponent(rbEdit);
    rbVGroup.addComponent(rbPrint);

    GroupLayout.ParallelGroup fileVGroup = layout.createParallelGroup(GroupLayout.Alignment.BASELINE);
    fileVGroup.addComponent(lblFile);
    fileVGroup.addComponent(btnLaunchApplication);
    fileVGroup.addComponent(txtFile);
    fileVGroup.addComponent(btnFile);

    majorVGroup.addGroup(uriVGroup);
    majorVGroup.addGroup(mailVGroup);
    majorVGroup.addGroup(rbVGroup);
    majorVGroup.addGroup(fileVGroup);

    layout.setVerticalGroup(majorVGroup);

    pack();
}

From source file:strobe.spectroscopy.StrobeSpectroscopy.java

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

    fileChooser = new javax.swing.JFileChooser();
    graphPanel = new javax.swing.JPanel();
    controlPanel = new javax.swing.JPanel();
    btnStart = new javax.swing.JButton();
    btnPause = new javax.swing.JButton();
    btnStop = new javax.swing.JButton();
    spr1 = new javax.swing.JSeparator();
    tbtnBackward = new javax.swing.JToggleButton();
    tbtnForward = new javax.swing.JToggleButton();
    spr2 = new javax.swing.JSeparator();
    jPanel1 = new javax.swing.JPanel();
    cBoxSpeed = new javax.swing.JComboBox<>();
    spr4 = new javax.swing.JSeparator();
    cBoxResolution = new javax.swing.JComboBox<>();
    spr3 = new javax.swing.JSeparator();
    cBoxFromWavelength = new javax.swing.JComboBox<>();
    cBoxToWavelength = new javax.swing.JComboBox<>();
    spr5 = new javax.swing.JSeparator();
    btnSetZero = new javax.swing.JButton();
    btnSetMark = new javax.swing.JButton();
    strobeMenuBar = new javax.swing.JMenuBar();
    menuFile = new javax.swing.JMenu();
    menuFileOpen = new javax.swing.JMenuItem();
    menuFileSave = new javax.swing.JMenuItem();
    menuFileExit = new javax.swing.JMenuItem();
    settingMenu = new javax.swing.JMenu();
    menuAbout = new javax.swing.JMenu();
    menuAboutAbout = new javax.swing.JMenuItem();

    fileChooser.setAcceptAllFileFilterUsed(false);

    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    setTitle("Strobe-spectroscopy");
    setIconImage(new javax.swing.ImageIcon(getClass().getResource("/icons/iconFrame.png")).getImage());
    setLocationByPlatform(true);
    setMinimumSize(new java.awt.Dimension(800, 550));
    setName("strobeFrame"); // NOI18N
    setPreferredSize(new java.awt.Dimension(800, 550));

    controlPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));
    controlPanel.setLayout(new javax.swing.BoxLayout(controlPanel, javax.swing.BoxLayout.X_AXIS));

    btnStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/iconStart.png"))); // NOI18N
    btnStart.setToolTipText("Start measurement");
    btnStart.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnStartActionPerformed(evt);
        }
    });
    controlPanel.add(btnStart);

    btnPause.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/iconPause.png"))); // NOI18N
    btnPause.setToolTipText("Pause measurement");
    btnPause.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnPauseActionPerformed(evt);
        }
    });
    controlPanel.add(btnPause);

    btnStop.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/iconStop.png"))); // NOI18N
    btnStop.setToolTipText("Stop measurement");
    btnStop.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnStopActionPerformed(evt);
        }
    });
    controlPanel.add(btnStop);

    spr1.setForeground(new java.awt.Color(255, 255, 255));
    spr1.setOrientation(javax.swing.SwingConstants.VERTICAL);
    spr1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    spr1.setMaximumSize(new java.awt.Dimension(5, 0));
    spr1.setPreferredSize(new java.awt.Dimension(5, 0));
    spr1.setRequestFocusEnabled(false);
    controlPanel.add(spr1);
    spr1.getAccessibleContext().setAccessibleDescription("");

    tbtnBackward.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/iconBackward.png"))); // NOI18N
    tbtnBackward.setToolTipText("Backwar spinning of the driver, while pressed.");
    tbtnBackward.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            tbtnBackwardActionPerformed(evt);
        }
    });
    controlPanel.add(tbtnBackward);

    tbtnForward.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/iconForward.png"))); // NOI18N
    tbtnForward.setToolTipText("Forward spinning of the drive, while pressed.");
    tbtnForward.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            tbtnForwardActionPerformed(evt);
        }
    });
    controlPanel.add(tbtnForward);

    spr2.setForeground(new java.awt.Color(255, 255, 255));
    spr2.setOrientation(javax.swing.SwingConstants.VERTICAL);
    spr2.setAlignmentX(1.0F);
    spr2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    spr2.setMaximumSize(new java.awt.Dimension(5, 0));
    spr2.setPreferredSize(new java.awt.Dimension(5, 0));
    spr2.setRequestFocusEnabled(false);
    controlPanel.add(spr2);

    jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS));

    cBoxSpeed.setToolTipText("");
    cBoxSpeed.setMinimumSize(new java.awt.Dimension(50, 20));
    cBoxSpeed.setPreferredSize(new java.awt.Dimension(50, 20));
    jPanel1.add(cBoxSpeed);

    spr4.setForeground(new java.awt.Color(255, 255, 255));
    spr4.setOrientation(javax.swing.SwingConstants.VERTICAL);
    spr4.setAlignmentX(1.0F);
    spr4.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    spr4.setMaximumSize(new java.awt.Dimension(5, 0));
    spr4.setPreferredSize(new java.awt.Dimension(5, 0));
    spr4.setRequestFocusEnabled(false);
    jPanel1.add(spr4);

    cBoxResolution.setAutoscrolls(true);
    cBoxResolution.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    cBoxResolution.setMinimumSize(new java.awt.Dimension(50, 20));
    cBoxResolution.setPreferredSize(new java.awt.Dimension(50, 20));
    cBoxResolution.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cBoxResolutionActionPerformed(evt);
        }
    });
    jPanel1.add(cBoxResolution);

    controlPanel.add(jPanel1);

    spr3.setForeground(new java.awt.Color(255, 255, 255));
    spr3.setOrientation(javax.swing.SwingConstants.VERTICAL);
    spr3.setAlignmentX(1.0F);
    spr3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    spr3.setMaximumSize(new java.awt.Dimension(5, 0));
    spr3.setPreferredSize(new java.awt.Dimension(5, 0));
    spr3.setRequestFocusEnabled(false);
    controlPanel.add(spr3);

    cBoxFromWavelength.setEditable(true);
    cBoxFromWavelength.setAutoscrolls(true);
    controlPanel.add(cBoxFromWavelength);

    cBoxToWavelength.setEditable(true);
    cBoxToWavelength.setAutoscrolls(true);
    cBoxToWavelength.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cBoxToWavelengthActionPerformed(evt);
        }
    });
    controlPanel.add(cBoxToWavelength);

    spr5.setForeground(new java.awt.Color(255, 255, 255));
    spr5.setOrientation(javax.swing.SwingConstants.VERTICAL);
    spr5.setAlignmentX(1.0F);
    spr5.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    spr5.setMaximumSize(new java.awt.Dimension(5, 0));
    spr5.setPreferredSize(new java.awt.Dimension(5, 0));
    spr5.setRequestFocusEnabled(false);
    controlPanel.add(spr5);

    btnSetZero.setText("Set zero");
    btnSetZero.setToolTipText("Set zero imput signal level to subtract thermal noise");
    btnSetZero.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSetZeroActionPerformed(evt);
        }
    });
    controlPanel.add(btnSetZero);

    btnSetMark.setText("Mark");
    btnSetMark.setToolTipText("Set a mark on the input graph");
    btnSetMark.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSetMarkActionPerformed(evt);
        }
    });
    controlPanel.add(btnSetMark);

    getContentPane().add(controlPanel, java.awt.BorderLayout.SOUTH);

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

    menuFileOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O,
            java.awt.event.InputEvent.CTRL_MASK));
    menuFileOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/open.png"))); // NOI18N
    menuFileOpen.setText("Open");
    menuFileOpen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileOpenActionPerformed(evt);
        }
    });
    menuFile.add(menuFileOpen);

    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("/icons/save.png"))); // NOI18N
    menuFileSave.setText("Save");
    menuFileSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuFileSaveActionPerformed(evt);
        }
    });
    menuFile.add(menuFileSave);

    menuFileExit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.CTRL_MASK));
    menuFileExit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/close.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);

    strobeMenuBar.add(menuFile);

    settingMenu.setText("Settings");
    strobeMenuBar.add(settingMenu);

    menuAbout.setText("About");

    menuAboutAbout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/info.png"))); // NOI18N
    menuAboutAbout.setText("About");
    menuAboutAbout.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuAboutAboutActionPerformed(evt);
        }
    });
    menuAbout.add(menuAboutAbout);

    //chartPanel.setPreferredSize( new java.awt.Dimension(graphPanel.getMinimumSize()));

    chartPanel.setMaximumSize(new Dimension(3000, 2000));
    graphPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Spectrum"));

    graphPanel.add(chartPanel);
    graphPanel.setLayout(new GridLayout(0, 1));
    getContentPane().add(graphPanel, java.awt.BorderLayout.CENTER);

    chartRenderer.setSeriesPaint(0, Color.RED);
    chartRenderer.setSeriesStroke(0, new BasicStroke(2.0f));
    plot.setRenderer(chartRenderer);
    plot.datasetChanged(new DatasetChangeEvent(graphChart, dataSet));
    marker.setPaint(Color.red);
    plot.addDomainMarker(marker);

    strobeMenuBar.add(menuAbout);

    setJMenuBar(strobeMenuBar);

    pack();
}

From source file:gui.TheGui.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 ww . j  av  a  2 s.c o  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    buttonGroup1 = new javax.swing.ButtonGroup();
    buttonGroup2 = new javax.swing.ButtonGroup();
    buttonGroup3 = new javax.swing.ButtonGroup();
    buttonGroup4 = new javax.swing.ButtonGroup();
    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jRadioButton1 = new javax.swing.JRadioButton();
    jRadioButton2 = new javax.swing.JRadioButton();
    jRadioButton3 = new javax.swing.JRadioButton();
    jRadioButton4 = new javax.swing.JRadioButton();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jRadioButton5 = new javax.swing.JRadioButton();
    jRadioButton6 = new javax.swing.JRadioButton();
    jPanel6 = new javax.swing.JPanel();
    jRadioButton7 = new javax.swing.JRadioButton();
    jRadioButton8 = new javax.swing.JRadioButton();
    jPanel5 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jProgressBar1 = new javax.swing.JProgressBar();
    jButton1 = new javax.swing.JButton();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenuItem1 = new javax.swing.JMenuItem();
    jMenu3 = new javax.swing.JMenu();
    jMenuItem2 = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setResizable(false);

    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "EradioParser v2.0",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.ABOVE_TOP));

    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Main Options",
            javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP));

    buttonGroup1.add(jRadioButton1);
    jRadioButton1.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
    jRadioButton1.setText("<html><b>Get</b> a playlist for all the stations at <b>e-radio.gr</b>.</html>");
    jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton1ActionPerformed(evt);
        }
    });

    buttonGroup1.add(jRadioButton2);
    jRadioButton2.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
    jRadioButton2
            .setText("<html><b>View</b> the available <b>station Categories</b> and get a playlist.</html>");

    buttonGroup1.add(jRadioButton3);
    jRadioButton3.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
    jRadioButton3
            .setText("<html><b>View</b> the available <b>station Locations</b> and get a playlist.</html>");

    buttonGroup1.add(jRadioButton4);
    jRadioButton4.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
    jRadioButton4.setText(
            "<html><b>View</b> the station<b> Locations & Categories</b> and create a custom playlist.</html>");
    jRadioButton4.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton4ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addGap(15, 15, 15).addGroup(jPanel2Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jRadioButton4, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jRadioButton1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jRadioButton2, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jRadioButton3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(56, Short.MAX_VALUE)));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addGap(18, 18, 18)
                    .addComponent(jRadioButton1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jRadioButton2, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jRadioButton3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jRadioButton4, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(15, Short.MAX_VALUE)));

    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Run control",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.ABOVE_TOP));

    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Playlist type",
            javax.swing.border.TitledBorder.RIGHT, javax.swing.border.TitledBorder.BELOW_TOP));

    buttonGroup3.add(jRadioButton5);
    jRadioButton5.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
    jRadioButton5.setText(".m3u playlist");
    jRadioButton5.setToolTipText("Select to create .m3u Playlist");
    jRadioButton5.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton5ActionPerformed(evt);
        }
    });

    buttonGroup3.add(jRadioButton6);
    jRadioButton6.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
    jRadioButton6.setSelected(true);
    jRadioButton6.setText(".xspf playlist");
    jRadioButton6.setToolTipText("Select to create .xspf Playlist");
    jRadioButton6.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton6ActionPerformed(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(jRadioButton5).addComponent(jRadioButton6))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup().addGap(17, 17, 17).addComponent(jRadioButton5)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jRadioButton6).addContainerGap(19, Short.MAX_VALUE)));

    jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Run Messges"));

    buttonGroup4.add(jRadioButton7);
    jRadioButton7.setText("Disable Run Messages");
    jRadioButton7.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton7ActionPerformed(evt);
        }
    });

    buttonGroup4.add(jRadioButton8);
    jRadioButton8.setSelected(true);
    jRadioButton8.setText("Enable Run Messages");
    jRadioButton8.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton8ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
    jPanel6.setLayout(jPanel6Layout);
    jPanel6Layout
            .setHorizontalGroup(
                    jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap(17, Short.MAX_VALUE)
                                    .addGroup(jPanel6Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jRadioButton7).addComponent(jRadioButton8))));
    jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap().addComponent(jRadioButton7)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jRadioButton8)));

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE)
            .addGroup(jPanel3Layout.createSequentialGroup()
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 3, Short.MAX_VALUE)));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Program Run messages",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.ABOVE_TOP));

    jScrollPane1.setAutoscrolls(true);
    jScrollPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    jScrollPane1.setVerifyInputWhenFocusTarget(false);

    jTextArea1.setColumns(20);
    jTextArea1.setEditable(false);
    jTextArea1.setFont(new java.awt.Font("Monospaced", 0, 11)); // NOI18N
    jTextArea1.setRows(5);
    jTextArea1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    DefaultCaret caret = (DefaultCaret) jTextArea1.getCaret();
    caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
    jScrollPane1.setViewportView(jTextArea1);

    jProgressBar1.setToolTipText("");

    javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout
            .setHorizontalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 512, Short.MAX_VALUE)
                    .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                    jPanel5Layout.createSequentialGroup().addGap(20, 20, 20)
                            .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGap(34, 34, 34).addComponent(jScrollPane1,
                                    javax.swing.GroupLayout.PREFERRED_SIZE, 117,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)));

    jButton1.setFont(new java.awt.Font("Times New Roman", 1, 21)); // NOI18N
    jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/runIcon2.png"))); // NOI18N
    jButton1.setText("Run");
    jButton1.setToolTipText("Click to run");
    jButton1.setIconTextGap(10);
    jButton1.setMaximumSize(new java.awt.Dimension(65, 30));
    jButton1.setMinimumSize(new java.awt.Dimension(65, 30));
    jButton1.setPreferredSize(new java.awt.Dimension(65, 30));
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(10, 10, 10))
                            .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup().addGap(39, 39, 39).addComponent(
                                    jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 128,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(42, 42, 42)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 60,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(58, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(13, 13, 13)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel5,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)));

    jMenuBar1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

    jMenu1.setText("File");

    jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/exitIcon.png"))); // NOI18N
    jMenuItem1.setText("Exit");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    jMenu1.add(jMenuItem1);

    jMenuBar1.add(jMenu1);

    jMenu3.setText("About");

    jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/InfoIcon.png"))); // NOI18N
    jMenuItem2.setText("Info");
    jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem2ActionPerformed(evt);
        }
    });
    jMenu3.add(jMenuItem2);

    jMenuBar1.add(jMenu3);

    setJMenuBar(jMenuBar1);

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

    pack();
}

From source file:org.deeplearning4j.examples.dataexamples.CSVPlotter.java

/**
 * Generate an xy plot of the datasets provided.
 *//*from  w ww  .  j  av a2s. c o m*/
private static void plotDataset(ArrayList<DataSet> DataSetList) {

    XYSeriesCollection c = new XYSeriesCollection();

    int dscounter = 1; //use to name the dataseries
    for (DataSet ds : DataSetList) {
        INDArray features = ds.getFeatures();
        INDArray outputs = ds.getLabels();

        int nRows = features.rows();
        XYSeries series = new XYSeries("S" + dscounter);
        for (int i = 0; i < nRows; i++) {
            series.add(features.getDouble(i), outputs.getDouble(i));
        }

        c.addSeries(series);
    }

    String title = "title";
    String xAxisLabel = "xAxisLabel";
    String yAxisLabel = "yAxisLabel";
    PlotOrientation orientation = PlotOrientation.VERTICAL;
    boolean legend = false;
    boolean tooltips = false;
    boolean urls = false;
    JFreeChart chart = ChartFactory.createScatterPlot(title, xAxisLabel, yAxisLabel, c, orientation, legend,
            tooltips, urls);
    JPanel panel = new ChartPanel(chart);

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

    f.setVisible(true);
}

From source file:UserInfo_Frame.java

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

    jToolBar1 = new javax.swing.JToolBar();
    jTabbedPane4 = new javax.swing.JTabbedPane();
    jPanel9 = new javax.swing.JPanel();
    Combo_parameter = new javax.swing.JComboBox();
    jLabel13 = new javax.swing.JLabel();
    Min = new javax.swing.JTextField();
    Max = new javax.swing.JTextField();
    jButton5 = new javax.swing.JButton();
    jPanel10 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jTextField2 = new javax.swing.JTextField();
    jTextField3 = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jTabbedPane5 = new javax.swing.JTabbedPane();
    jDesktopPane1 = new javax.swing.JDesktopPane();
    jScrollPane1 = new javax.swing.JScrollPane();
    Table_UserInfo = new javax.swing.JTable();
    jPanel1 = new javax.swing.JPanel();
    jLabel6 = new javax.swing.JLabel();
    txt_pumid = new javax.swing.JTextField();
    jLabel7 = new javax.swing.JLabel();
    jLabel8 = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    jLabel10 = new javax.swing.JLabel();
    txt_temperature = new javax.swing.JTextField();
    txt_pressure = new javax.swing.JTextField();
    txt_volume = new javax.swing.JTextField();
    jLabel12 = new javax.swing.JLabel();
    txt_rotationalSpd = new javax.swing.JTextField();
    jButton4 = new javax.swing.JButton();
    txt_date = new com.toedter.calendar.JDateChooser();
    jButton7 = new javax.swing.JButton();
    barChart_btn = new javax.swing.JButton();
    jButton6 = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    jSlider1 = new javax.swing.JSlider();
    txt_valueInt = new javax.swing.JTextField();
    jButton2 = new javax.swing.JButton();
    df = new com.toedter.calendar.JDateChooser();
    jProgressBar1 = new javax.swing.JProgressBar();
    jButton3 = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jButton8 = new javax.swing.JButton();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTree1 = new javax.swing.JTree();
    btn_openFile = new javax.swing.JButton();
    jLabel11 = new javax.swing.JLabel();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenu2 = new javax.swing.JMenu();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jToolBar1.setRollover(true);

    Combo_parameter.setModel(new javax.swing.DefaultComboBoxModel(
            new String[] { "Pressure", "VolumeFlow", "Tempearature", "RotationalSpeed", "Torque" }));

    jLabel13.setText("Value");

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

    javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
    jPanel9.setLayout(jPanel9Layout);
    jPanel9Layout.setHorizontalGroup(jPanel9Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel9Layout.createSequentialGroup().addGap(26, 26, 26)
                                    .addComponent(jLabel13).addGap(18, 18, 18)
                                    .addComponent(Min, javax.swing.GroupLayout.PREFERRED_SIZE, 130,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18).addComponent(Max,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 137,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel9Layout.createSequentialGroup().addGap(135, 135, 135).addComponent(
                                    Combo_parameter, javax.swing.GroupLayout.PREFERRED_SIZE, 165,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel9Layout.createSequentialGroup().addGap(173, 173, 173).addComponent(
                                    jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 109,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(708, Short.MAX_VALUE)));
    jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap()
                    .addComponent(Combo_parameter, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(20, 20, 20)
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(Min, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(Max, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18).addComponent(jButton5).addContainerGap(393, Short.MAX_VALUE)));

    jTabbedPane4.addTab("User Input", jPanel9);

    jLabel1.setText("PARAMETER");

    jLabel2.setText("MIN");

    jLabel3.setText("MAX");

    jLabel4.setText("AVG");

    jLabel5.setText("Presure");

    jButton1.setText("Calculate");

    javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
    jPanel10.setLayout(jPanel10Layout);
    jPanel10Layout.setHorizontalGroup(jPanel10Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup().addGroup(jPanel10Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup().addGap(38, 38, 38).addGroup(jPanel10Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel10Layout.createSequentialGroup().addComponent(jLabel1)
                                    .addGap(54, 54, 54).addComponent(jLabel2))
                            .addComponent(jLabel5))
                            .addGroup(jPanel10Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel10Layout.createSequentialGroup().addGap(85, 85, 85)
                                            .addComponent(jLabel3).addGap(91, 91, 91).addComponent(jLabel4))
                                    .addGroup(jPanel10Layout.createSequentialGroup().addGap(66, 66, 66)
                                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    83, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(49, 49, 49).addComponent(jTextField3,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 83,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel10Layout.createSequentialGroup().addGap(255, 255, 255)
                            .addComponent(jButton1)))
                    .addContainerGap(583, Short.MAX_VALUE))
            .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup().addGap(160, 160, 160)
                            .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 83,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(833, Short.MAX_VALUE))));
    jPanel10Layout.setVerticalGroup(jPanel10Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup().addGap(30, 30, 30)
                    .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(jLabel2).addComponent(jLabel3)
                            .addComponent(jLabel4))
                    .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel10Layout.createSequentialGroup().addGap(18, 18, 18)
                                    .addComponent(jLabel5))
                            .addGroup(jPanel10Layout.createSequentialGroup().addGap(27, 27, 27)
                                    .addGroup(jPanel10Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 359, Short.MAX_VALUE)
                    .addComponent(jButton1).addGap(37, 37, 37))
            .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup().addGap(78, 78, 78)
                            .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(424, Short.MAX_VALUE))));

    jTabbedPane4.addTab("Statistics values", jPanel10);

    jDesktopPane1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Table UserInfo",
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 16),
            new java.awt.Color(51, 0, 51))); // NOI18N

    Table_UserInfo
            .setModel(new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
    Table_UserInfo.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            Table_UserInfoMouseClicked(evt);
        }
    });
    jScrollPane1.setViewportView(Table_UserInfo);

    jLabel6.setText("PumId");

    jLabel7.setText("Date");

    jLabel8.setText("Pressure");

    jLabel9.setText("Temperature");

    jLabel10.setText("Volume Flow");

    jLabel12.setText("Rotational Spd");

    jButton4.setText("Save");
    jButton4.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton4ActionPerformed(evt);
        }
    });

    txt_date.setDateFormatString("yyyy-MM-dd");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(28, 28, 28).addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel9).addComponent(jLabel8).addComponent(jLabel7)
                            .addComponent(jLabel6))
                    .addComponent(jLabel10).addComponent(jLabel12))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
                    .addGroup(
                            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(txt_pumid)
                                    .addComponent(txt_pressure, javax.swing.GroupLayout.DEFAULT_SIZE, 211,
                                            Short.MAX_VALUE)
                                    .addComponent(txt_temperature, javax.swing.GroupLayout.DEFAULT_SIZE, 211,
                                            Short.MAX_VALUE)
                                    .addComponent(txt_volume, javax.swing.GroupLayout.DEFAULT_SIZE, 211,
                                            Short.MAX_VALUE)
                                    .addComponent(txt_rotationalSpd, javax.swing.GroupLayout.DEFAULT_SIZE, 211,
                                            Short.MAX_VALUE)
                                    .addComponent(txt_date, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(46, 46, 46))
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(148, 148, 148).addComponent(jButton4)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6).addComponent(txt_pumid,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel7).addComponent(txt_date,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8).addComponent(txt_pressure,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel9).addComponent(txt_temperature,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel10).addComponent(txt_volume,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel12).addComponent(txt_rotationalSpd,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jButton4)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

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

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

    jButton6.setText("Query Chart");
    jButton6.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton6ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1);
    jDesktopPane1.setLayout(jDesktopPane1Layout);
    jDesktopPane1Layout.setHorizontalGroup(jDesktopPane1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jDesktopPane1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 199, Short.MAX_VALUE)
                    .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jDesktopPane1Layout.createSequentialGroup().addComponent(jButton7)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(barChart_btn).addGap(27, 27, 27).addComponent(jButton6))
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 390,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(32, 32, 32)));
    jDesktopPane1Layout.setVerticalGroup(jDesktopPane1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jDesktopPane1Layout.createSequentialGroup().addGap(40, 40, 40)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(jDesktopPane1Layout.createSequentialGroup()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 338,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(31, 31, 31)
                    .addGroup(
                            jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jButton7).addComponent(barChart_btn).addComponent(jButton6))
                    .addGap(0, 67, Short.MAX_VALUE)));
    jDesktopPane1.setLayer(jScrollPane1, javax.swing.JLayeredPane.DEFAULT_LAYER);
    jDesktopPane1.setLayer(jPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER);
    jDesktopPane1.setLayer(jButton7, javax.swing.JLayeredPane.DEFAULT_LAYER);
    jDesktopPane1.setLayer(barChart_btn, javax.swing.JLayeredPane.DEFAULT_LAYER);
    jDesktopPane1.setLayer(jButton6, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jTabbedPane5.addTab("tab1", jDesktopPane1);

    jTabbedPane4.addTab("Decision Making", jTabbedPane5);

    jSlider1.setMajorTickSpacing(20);
    jSlider1.setMaximum(120);
    jSlider1.setMinorTickSpacing(5);
    jSlider1.setPaintLabels(true);
    jSlider1.setPaintTicks(true);

    jButton2.setText("OK");

    jProgressBar1.setStringPainted(true);

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

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addContainerGap(715, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
                                    javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout
                                            .createSequentialGroup().addGap(79, 79, 79).addGroup(jPanel2Layout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(df,
                                                            javax.swing.GroupLayout.Alignment.TRAILING,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 152,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                            jPanel2Layout.createSequentialGroup()
                                                                    .addComponent(jButton3).addGap(35, 35, 35)))
                                            .addGap(35, 35, 35))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel2Layout.createSequentialGroup()
                                            .addComponent(txt_valueInt, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    136, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(57, 57, 57).addComponent(jButton2))
                                    .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, 246,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 268,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(93, 93, 93)));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addGap(64, 64, 64)
                    .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(26, 26, 26)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txt_valueInt, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton2))
                    .addGap(18, 18, 18)
                    .addComponent(df, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(8, 8, 8)
                    .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 32,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(jButton3).addContainerGap(217, Short.MAX_VALUE)));

    jTabbedPane4.addTab("tab4", jPanel2);

    jButton8.setText("Mail");
    jButton8.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton8ActionPerformed(evt);
        }
    });

    jTree1.setModel(new FileSystemModel(new File("C:\\Users")));
    jTree1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jTree1MouseClicked(evt);
        }
    });
    jScrollPane2.setViewportView(jTree1);

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

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout
            .setHorizontalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 240,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btn_openFile).addGap(171, 171, 171).addComponent(jButton8)
                            .addContainerGap(498, Short.MAX_VALUE)));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addGap(31, 31, 31)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton8).addComponent(btn_openFile))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(jPanel3Layout.createSequentialGroup().addComponent(jScrollPane2,
                    javax.swing.GroupLayout.PREFERRED_SIZE, 468, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 60, Short.MAX_VALUE)));

    jTabbedPane4.addTab("tab5", jPanel3);

    jLabel11.setText("jLabel11");

    jMenu1.setText("File");
    jMenuBar1.add(jMenu1);

    jMenu2.setText("Edit");
    jMenuBar1.add(jMenu2);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(623, 623, 623).addComponent(jToolBar1,
                    javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup().addGap(31, 31, 31).addComponent(jLabel11)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup().addComponent(jTabbedPane4,
                    javax.swing.GroupLayout.PREFERRED_SIZE, 1081, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(71, 71, 71)
                    .addComponent(jTabbedPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 562,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(86, 86, 86).addComponent(jLabel11)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    setSize(new java.awt.Dimension(1130, 735));
    setLocationRelativeTo(null);
}