Example usage for javax.swing JLayeredPane DEFAULT_LAYER

List of usage examples for javax.swing JLayeredPane DEFAULT_LAYER

Introduction

In this page you can find the example usage for javax.swing JLayeredPane DEFAULT_LAYER.

Prototype

Integer DEFAULT_LAYER

To view the source code for javax.swing JLayeredPane DEFAULT_LAYER.

Click Source Link

Document

Convenience object defining the Default layer.

Usage

From source file:MainClass.java

public static void main(String args[]) {
    JFrame f = new JFrame("Sample");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JLayeredPane desktop = new JDesktopPane();
    desktop.setOpaque(false);//from  www .jav a  2  s . com
    desktop.add(new SelfInternalFrame("1"), JLayeredPane.POPUP_LAYER);
    desktop.add(new SelfInternalFrame("2"), JLayeredPane.DEFAULT_LAYER);
    desktop.add(new SelfInternalFrame("3"), JLayeredPane.PALETTE_LAYER);

    f.add(desktop, BorderLayout.CENTER);
    f.setSize(300, 200);
    f.setVisible(true);
}

From source file:InternalTest.java

public static void main(String args[]) {
    JFrame frame = new JFrame();
    Container contentPane = frame.getContentPane();
    JLayeredPane desktop = new JDesktopPane();
    desktop.setOpaque(false);/*w  w  w. jav a  2s . c om*/
    desktop.add(createLayer("One"), JLayeredPane.POPUP_LAYER);
    desktop.add(createLayer("Two"), JLayeredPane.DEFAULT_LAYER);
    desktop.add(createLayer("Three"), JLayeredPane.PALETTE_LAYER);
    contentPane.add(desktop, BorderLayout.CENTER);
    frame.setSize(300, 300);
    frame.show();
}

From source file:InternalFrameTest.java

public static void main(String args[]) {
    JFrame frame = new JFrame("Internal Frame Listener");
    Container contentPane = frame.getContentPane();
    JLayeredPane desktop = new JDesktopPane();
    desktop.setOpaque(false);/*from   w  w w.  j  a v  a2  s. c o m*/
    desktop.add(createLayer("One"), JLayeredPane.POPUP_LAYER);
    desktop.add(createLayer("Two"), JLayeredPane.DEFAULT_LAYER);
    desktop.add(createLayer("Three"), JLayeredPane.PALETTE_LAYER);
    contentPane.add(desktop, BorderLayout.CENTER);
    frame.setSize(300, 300);
    frame.show();
}

From source file:InternalFrameEventTest.java

public static void main(String[] a) {

    JFrame frame = new JFrame();
    Container contentPane = frame.getContentPane();

    JLayeredPane desktop = new JDesktopPane();
    desktop.setOpaque(false);//from w w  w  .  j a  v  a 2s  .  c  o m
    contentPane.add(desktop, BorderLayout.CENTER);
    desktop.add(createLayer("One"), JLayeredPane.POPUP_LAYER);
    desktop.add(createLayer("Two"), JLayeredPane.DEFAULT_LAYER);
    desktop.add(createLayer("Three"), JLayeredPane.PALETTE_LAYER);

    frame.setSize(400, 200);
    frame.setVisible(true);

}

From source file:com.rubenlaguna.en4j.mainmodule.NoteListTopComponent.java

public NoteListTopComponent() {
    LOG.log(Level.INFO, "creating NoteListTopComponen {0}", this.toString());
    initComponents();/*from  w ww  . ja  v  a2 s .  c o  m*/
    setName(NbBundle.getMessage(NoteListTopComponent.class, "CTL_NoteListTopComponent"));
    setToolTipText(NbBundle.getMessage(NoteListTopComponent.class, "HINT_NoteListTopComponent"));
    associateLookup(new AbstractLookup(ic));
    putClientProperty(PROP_CLOSING_DISABLED, true);
    //        jTable1.getSelectionModel().addListSelectionListener(this);
    customGlassPane.setVisible(false);
    jLayeredPane1.add(customGlassPane, (Integer) (JLayeredPane.DEFAULT_LAYER + 50));
}

From source file:com.rubenlaguna.en4j.mainmodule.NoteListTopComponent.java

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

    jLayeredPane1 = new javax.swing.JLayeredPane();
    jLayeredPane1.setLayout(new OverlayLayout(jLayeredPane1));
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    searchJButton = new javax.swing.JButton();
    partialResultsJLabel = new javax.swing.JLabel();

    jScrollPane1.setBounds(jLayeredPane1.getVisibleRect());

    jTable1.setModel(getGlazedListTableModel());
    jTable1.setBounds(jScrollPane1.getVisibleRect());
    jTable1.setColumnSelectionAllowed(true);
    jScrollPane1.setViewportView(jTable1);
    jTable1.getColumnModel().getSelectionModel()
            .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

    jScrollPane1.setBounds(0, 0, 450, -1);
    jLayeredPane1.add(jScrollPane1, javax.swing.JLayeredPane.DEFAULT_LAYER);

    searchTextField.setText(org.openide.util.NbBundle.getMessage(NoteListTopComponent.class,
            "NoteListTopComponent.searchTextField.text")); // NOI18N
    searchTextField.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusGained(java.awt.event.FocusEvent evt) {
            searchTextFieldFocusGained(evt);
        }

        public void focusLost(java.awt.event.FocusEvent evt) {
            searchTextFieldFocusLost(evt);
        }
    });

    org.openide.awt.Mnemonics.setLocalizedText(searchJButton, org.openide.util.NbBundle
            .getMessage(NoteListTopComponent.class, "NoteListTopComponent.searchJButton.text")); // NOI18N
    searchJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            searchJButtonActionPerformed(evt);
        }
    });

    org.openide.awt.Mnemonics.setLocalizedText(partialResultsJLabel, org.openide.util.NbBundle
            .getMessage(NoteListTopComponent.class, "NoteListTopComponent.partialResultsJLabel.text")); // NOI18N

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLayeredPane1, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 469, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(searchTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 304,
                                            Short.MAX_VALUE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(partialResultsJLabel)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(searchJButton)))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(30, 30, 30).addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(searchTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(searchJButton).addComponent(partialResultsJLabel,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(10, 10, 10)
                    .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 286, Short.MAX_VALUE)
                    .addContainerGap()));
}

From source file:nl.phanos.liteliveresultsclient.gui.ResultsWindows.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 . ja  v  a  2s .co  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    LayerdPane = new javax.swing.JLayeredPane();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    jPanel1 = new javax.swing.JPanel();
    SerieLabel = new java.awt.Label();
    photopanel = new javax.swing.JPanel();
    photolabel = new javax.swing.JLabel();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();
    jMenuItem1 = new javax.swing.JMenuItem();
    jMenuItem2 = new javax.swing.JMenuItem();
    jCheckBoxMenuItem2 = new javax.swing.JCheckBoxMenuItem();
    jMenu2 = new javax.swing.JMenu();
    SeparateClock = new javax.swing.JCheckBoxMenuItem();
    ChangeIp = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setPreferredSize(new java.awt.Dimension(1280, 720));
    addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentResized(java.awt.event.ComponentEvent evt) {
            formComponentResized(evt);
        }
    });

    jTable1.setBackground(new java.awt.Color(0, 0, 0));
    jTable1.setFont(new java.awt.Font("Lucida Grande", 0, 48)); // NOI18N
    jTable1.setForeground(java.awt.Color.yellow);
    jTable1.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" }));
    jTable1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseMoved(java.awt.event.MouseEvent evt) {
            jTable1MouseMoved(evt);
        }
    });
    jTable1.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentResized(java.awt.event.ComponentEvent evt) {
            jTable1ComponentResized(evt);
        }
    });
    jScrollPane1.setViewportView(jTable1);

    SerieLabel.setBackground(new java.awt.Color(0, 0, 0));
    SerieLabel.setFont(new java.awt.Font("Lucida Grande", 0, 48)); // NOI18N
    SerieLabel.setForeground(java.awt.Color.yellow);
    SerieLabel.setText("200m T64 Finale");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(SerieLabel, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, 724, Short.MAX_VALUE));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(SerieLabel, javax.swing.GroupLayout.DEFAULT_SIZE,
                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));

    SerieLabel.getAccessibleContext().setAccessibleName("SerieLabel");

    photopanel.setBackground(new java.awt.Color(0, 0, 0));
    photopanel.setPreferredSize(new java.awt.Dimension(0, 100));
    photopanel.setRequestFocusEnabled(false);

    javax.swing.GroupLayout photopanelLayout = new javax.swing.GroupLayout(photopanel);
    photopanel.setLayout(photopanelLayout);
    photopanelLayout.setHorizontalGroup(photopanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(photopanelLayout.createSequentialGroup().addContainerGap().addComponent(photolabel,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    photopanelLayout.setVerticalGroup(photopanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(photopanelLayout.createSequentialGroup().addContainerGap().addComponent(photolabel,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    LayerdPane.setLayer(jScrollPane1, javax.swing.JLayeredPane.DEFAULT_LAYER);
    LayerdPane.setLayer(jPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER);
    LayerdPane.setLayer(photopanel, javax.swing.JLayeredPane.DEFAULT_LAYER);

    javax.swing.GroupLayout LayerdPaneLayout = new javax.swing.GroupLayout(LayerdPane);
    LayerdPane.setLayout(LayerdPaneLayout);
    LayerdPaneLayout
            .setHorizontalGroup(LayerdPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(LayerdPaneLayout.createSequentialGroup().addContainerGap().addComponent(
                            jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE))
                    .addGroup(LayerdPaneLayout.createSequentialGroup()
                            .addComponent(photopanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jScrollPane1)));
    LayerdPaneLayout.setVerticalGroup(LayerdPaneLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LayerdPaneLayout.createSequentialGroup()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(LayerdPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(photopanel, javax.swing.GroupLayout.DEFAULT_SIZE, 544,
                                    Short.MAX_VALUE)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 544,
                                    Short.MAX_VALUE))));

    jMenu1.setText("Options");

    jCheckBoxMenuItem1.setText("Fullscreen");
    jCheckBoxMenuItem1.setEnabled(false);
    jCheckBoxMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBoxMenuItem1ActionPerformed(evt);
        }
    });
    jMenu1.add(jCheckBoxMenuItem1);

    jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_EQUALS,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.META_MASK));
    jMenuItem1.setText("Larger Text");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    jMenu1.add(jMenuItem1);

    jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_MINUS,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.META_MASK));
    jMenuItem2.setText("Smaler Text");
    jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem2ActionPerformed(evt);
        }
    });
    jMenu1.add(jMenuItem2);

    jCheckBoxMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.META_MASK));
    jCheckBoxMenuItem2.setSelected(true);
    jCheckBoxMenuItem2.setText("ShowPhoto");
    jCheckBoxMenuItem2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBoxMenuItem2ActionPerformed(evt);
        }
    });
    jMenu1.add(jCheckBoxMenuItem2);

    jMenuBar1.add(jMenu1);

    jMenu2.setText("Clock");

    SeparateClock.setSelected(true);
    SeparateClock.setText("Separate clock");
    SeparateClock.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            SeparateClockActionPerformed(evt);
        }
    });
    jMenu2.add(SeparateClock);

    ChangeIp.setText("Change Ip");
    ChangeIp.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            ChangeIpActionPerformed(evt);
        }
    });
    jMenu2.add(ChangeIp);

    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).addComponent(LayerdPane));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(LayerdPane));

    LayerdPane.getAccessibleContext().setAccessibleName("");

    pack();
}

From source file:com.xilinx.kintex7.MainScreen.java

private Container createContentPane() {
    JPanel contentPane = new JPanel();
    contentPane.setLayout(new BorderLayout());
    contentPane.setOpaque(true);//from   w w  w . jav  a 2 s . com

    mainPanel = new JPanel(new BorderLayout());

    mainPanel.setBounds(0, 0, minWidth, minHeight);
    testPanel = new JPanel(new BorderLayout());

    testPanel.add(testAndStats(), BorderLayout.CENTER);

    mainPanel.add(testPanel, BorderLayout.LINE_START);

    //Make the center component big, since that's the
    //typical usage of BorderLayout.
    tabs = new JTabbedPane();

    mainPanel.add(tabs, BorderLayout.CENTER);

    tabs.add("System Monitor", pciInfo());
    tabs.add("Performance Plots", plotPanel());

    mainPanel.setOpaque(true);

    try {
        imagePanel = new ImageBackgroundPanel(blockDiagram, false);
    } catch (Exception e) {
    }
    /*imagePanel.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createTitledBorder("Design Block Diagram"),
                BorderFactory.createEmptyBorder(5,5,5,5)));*/
    imagePanel.setBackground(Color.WHITE);
    imagePanel.setSize(minWidth, minHeight);

    imagePanel.setLocation(0, 0);
    imagePanel.setOpaque(true);

    final JLayeredPane layeredPane = new JLayeredPane();
    layeredPane.setPreferredSize(new Dimension(minWidth, minHeight));
    layeredPane.add(mainPanel, JLayeredPane.DEFAULT_LAYER, 0);
    layeredPane.add(imagePanel, JLayeredPane.DEFAULT_LAYER, 0);
    layeredPane.addComponentListener(new ComponentListener() {

        @Override
        public void componentResized(ComponentEvent ce) {
            mainPanel.setBounds(0, 0, Math.max(minWidth, layeredPane.getWidth()),
                    Math.max(minHeight, layeredPane.getHeight()));
            if (layeredPane.getWidth() > 1024) {
                tplotPanel.setPreferredSize(new Dimension(300, 100));
            } else {
                tplotPanel.setPreferredSize(new Dimension(200, 100));
            }
            imagePanel.setSize(mainPanel.getWidth(), mainPanel.getHeight());
            imagePanel.setLocation(0, 0);
            mainPanel.repaint();
        }

        @Override
        public void componentMoved(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void componentShown(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void componentHidden(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }
    });
    // on top, but invisible initially
    imagePanel.setVisible(false);

    JPanel bpanel = new JPanel(new BorderLayout());

    final JButton button = new JButton(
            "<html><b>B<br>L<br>O<br>C<br>K<br> <br>D<br>I<br>A<br>G<br>R<br>A<br>M<br></b></html>");
    button.setToolTipText("Click here to see the block diagram");
    button.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent event) {
            adjustSelectionPanel();
        }
    });

    bpanel.add(button, BorderLayout.CENTER);

    contentPane.add(layeredPane, BorderLayout.CENTER);
    contentPane.add(button, BorderLayout.EAST);
    JLabel mLabel = new JLabel(modeText, JLabel.CENTER);
    mLabel.setFont(new Font(modeText, Font.BOLD, 15));
    contentPane.add(mLabel, BorderLayout.PAGE_START);
    return contentPane;
}

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./*from   www  .  j  a v  a 2s  .com*/
 */
@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);
}

From source file:com.xilinx.virtex7.MainScreen.java

private Container createContentPane() {
    JPanel contentPane = new JPanel();
    contentPane.setLayout(new BorderLayout());
    contentPane.setOpaque(true);/*from   w ww.j  av a  2  s. com*/

    mainPanel = new JPanel(new BorderLayout());

    mainPanel.setBounds(0, 0, minWidth, minHeight);
    testPanel = new JPanel(new BorderLayout());
    ttabs = new JTabbedPane();
    ttabs.add("DATAPATH 0&1", testAndStats());

    if (mode == LandingPage.PERFORMANCE_MODE_RAW || mode == LandingPage.PERFORMANCE_MODE_RAW_DV
            || mode == LandingPage.APPLICATION_MODE || mode == LandingPage.APPLICATION_MODE_P2P) // condition for placing dynamic tabs. a kcah
        ttabs.add("DATAPATH 2&3", testAndStatsSecondTab());
    else
        testAndStatsSecondTab();

    testPanel.add(ttabs, BorderLayout.CENTER);
    testPanel.add(messageBox(), BorderLayout.PAGE_END);

    mainPanel.add(testPanel, BorderLayout.LINE_START);

    //Make the center component big, since that's the
    //typical usage of BorderLayout.
    tabs = new JTabbedPane();

    mainPanel.add(tabs, BorderLayout.CENTER);

    tabs.add("System Monitor", pciInfo());
    tabs.add("Performance Plots", plotPanel());

    mainPanel.setOpaque(true);

    try {
        imagePanel = new ImageBackgroundPanel(blockDiagram, false);
    } catch (Exception e) {
    }
    /*imagePanel.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createTitledBorder("Design Block Diagram"),
                BorderFactory.createEmptyBorder(5,5,5,5)));*/
    imagePanel.setBackground(Color.WHITE);
    imagePanel.setSize(minWidth, minHeight);

    imagePanel.setLocation(0, 0);
    imagePanel.setOpaque(true);

    final JLayeredPane layeredPane = new JLayeredPane();
    layeredPane.setPreferredSize(new Dimension(minWidth, minHeight));
    layeredPane.add(mainPanel, JLayeredPane.DEFAULT_LAYER, 0);
    layeredPane.add(imagePanel, JLayeredPane.DEFAULT_LAYER, 0);
    layeredPane.addComponentListener(new ComponentListener() {

        @Override
        public void componentResized(ComponentEvent ce) {
            mainPanel.setBounds(0, 0, Math.max(minWidth, layeredPane.getWidth()),
                    Math.max(minHeight, layeredPane.getHeight()));
            if (layeredPane.getWidth() > 1024) {
                tplotPanel.setPreferredSize(new Dimension(300, 100));
            } else {
                tplotPanel.setPreferredSize(new Dimension(200, 100));
            }
            imagePanel.setSize(mainPanel.getWidth(), mainPanel.getHeight());
            imagePanel.setLocation(0, 0);
            mainPanel.repaint();
        }

        @Override
        public void componentMoved(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void componentShown(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void componentHidden(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }
    });
    // on top, but invisible initially
    imagePanel.setVisible(false);

    JPanel bpanel = new JPanel(new BorderLayout());

    final JButton button = new JButton(
            "<html><b>B<br>L<br>O<br>C<br>K<br> <br>D<br>I<br>A<br>G<br>R<br>A<br>M<br></b></html>");
    button.setToolTipText("Click here to see the block diagram");
    button.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent event) {
            adjustSelectionPanel();
        }
    });

    bpanel.add(button, BorderLayout.CENTER);

    contentPane.add(layeredPane, BorderLayout.CENTER);
    contentPane.add(button, BorderLayout.EAST);
    JPanel panel = new JPanel(new BorderLayout());

    JLabel mLabel = new JLabel(modeText, JLabel.CENTER);
    mLabel.setFont(new Font(modeText, Font.BOLD, 15));
    panel.add(mLabel, BorderLayout.PAGE_START);

    JPanel ledPanel = new JPanel(new BorderLayout());

    JPanel iledPanel = new JPanel();
    iledPanel.setLayout(new BoxLayout(iledPanel, BoxLayout.X_AXIS));

    led_ddr3_1 = new JLabel("DDR3 0", new ImageIcon(led1), JLabel.CENTER);
    led_ddr3_2 = new JLabel("DDR3 1", new ImageIcon(led1), JLabel.CENTER);
    led_phy0 = new JLabel("PHY 0", new ImageIcon(led1), JLabel.CENTER);
    led_phy1 = new JLabel("PHY 1", new ImageIcon(led1), JLabel.CENTER);
    led_phy2 = new JLabel("PHY 2", new ImageIcon(led1), JLabel.CENTER);
    led_phy3 = new JLabel("PHY 3", new ImageIcon(led1), JLabel.CENTER);

    JPanel le1 = new JPanel(new BorderLayout());
    le1.add(led_ddr3_1, BorderLayout.CENTER);

    JPanel le2 = new JPanel(new BorderLayout());
    le2.add(led_ddr3_2, BorderLayout.CENTER);

    JPanel le3 = new JPanel(new BorderLayout());
    le3.add(led_phy0, BorderLayout.CENTER);

    JPanel le4 = new JPanel(new BorderLayout());
    le4.add(led_phy1, BorderLayout.CENTER);

    JPanel le5 = new JPanel(new BorderLayout());
    le5.add(led_phy2, BorderLayout.CENTER);

    JPanel le6 = new JPanel(new BorderLayout());
    le6.add(led_phy3, BorderLayout.CENTER);

    iledPanel.add(le1);
    iledPanel.add(le2);
    iledPanel.add(le3);
    iledPanel.add(le4);
    iledPanel.add(le5);
    iledPanel.add(le6);

    if (mode == LandingPage.PERFORMANCE_MODE_RAW || mode == LandingPage.PERFORMANCE_MODE_RAW_DV) {
        startAll_tooltip = "This will start tests on all data paths";
        startAlltests = new JButton("Start All");
        startAlltests.setToolTipText(startAll_tooltip);
        startAlltests.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                if (startAlltests.getText().equals("Start All")) {
                    startAll_tooltip = "This will stop tests on all data paths";
                    startAlltests.setToolTipText(startAll_tooltip);
                    // check whether any tests are already started
                    String message = "";
                    if (testStarted || testStarted1)
                        message = "Test(s) on Path 0&1 are running. Cannot do Start All";
                    if (testStarted2 || testStarted3) {
                        if (message.length() > 0) // test 1 and 0 are also running
                            message = "Test(s) on Path 0&1 and 2&3 are running. Cannot do Start All";
                        else
                            message = "Test(s) on Path 2&3 are running. Cannot do Start All";
                    }
                    if (message.length() > 0) {
                        JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE);
                    } else {
                        String ledsMsg = checkLedsState();
                        // condition to check the ddr and py leds are enable or not
                        if (ledsMsg.length() == 0) {
                            startAlltests.setEnabled(false);
                            startAlltests.setText("Stop All");

                            startTest.doClick();
                            stest.doClick();
                            s3test.doClick();
                            s4test.doClick();

                            // disable all buttons
                            startTest.setEnabled(false);
                            stest.setEnabled(false);
                            s3test.setEnabled(false);
                            s4test.setEnabled(false);

                            startAlltests.setEnabled(true);
                        } else {// shows alert when leds are disabled                                
                            JOptionPane.showMessageDialog(null, ledsMsg, "Error", JOptionPane.ERROR_MESSAGE);
                        }

                    }
                } else {
                    startAlltests.setEnabled(false);
                    startAll_tooltip = "This will start tests on all data paths";
                    startAlltests.setToolTipText(startAll_tooltip);
                    /*
                    startTest.setEnabled(true);
                    stest.setEnabled(true);
                    s3test.setEnabled(true);
                    s4test.setEnabled(true);
                            
                    s3test.doClick();
                    s4test.doClick();
                    startTest.doClick();
                    stest.doClick();
                    */
                    SwingWorker worker = new SwingWorker<Void, Void>() {
                        @Override
                        protected Void doInBackground() throws Exception {
                            try {
                                stopTest4();
                                s4test.setEnabled(false);
                                stopTest3();
                                s3test.setEnabled(false);
                                stopTest2();
                                stest.setEnabled(false);
                                stopTest1();
                                startTest.setEnabled(false);

                                startAlltests.setText("Start All");
                                startAlltests.setEnabled(true);
                                startTest.setEnabled(true);
                                stest.setEnabled(true);
                                s3test.setEnabled(true);
                                s4test.setEnabled(true);
                            } catch (Exception e) {
                                e.printStackTrace();
                            }
                            return null;
                        }

                    };
                    worker.execute();
                }
            }
        });
        iledPanel.add(startAlltests);
    }
    ledPanel.add(iledPanel, BorderLayout.CENTER);

    //tstats.add(ledPanel);
    panel.add(ledPanel, BorderLayout.CENTER);
    contentPane.add(panel, BorderLayout.PAGE_START);
    return contentPane;
}