Example usage for javax.swing GroupLayout setVerticalGroup

List of usage examples for javax.swing GroupLayout setVerticalGroup

Introduction

In this page you can find the example usage for javax.swing GroupLayout setVerticalGroup.

Prototype

public void setVerticalGroup(Group group) 

Source Link

Document

Sets the Group that positions and sizes components along the vertical axis.

Usage

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

    pnl_sidebar = new javax.swing.JPanel();
    lbl_west = new javax.swing.JLabel();
    lbl_north = new javax.swing.JLabel();
    lbl_south = new javax.swing.JLabel();
    lbl_east = new javax.swing.JLabel();
    jPanel1 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    pnl_chart = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    pnl_table = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setBackground(new java.awt.Color(255, 255, 255));
    setLocationByPlatform(true);
    setUndecorated(true);

    pnl_sidebar.setBackground(new java.awt.Color(34, 41, 50));
    pnl_sidebar.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseDragged(java.awt.event.MouseEvent evt) {
            pnl_sidebarMouseDragged(evt);
        }
    });
    pnl_sidebar.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mousePressed(java.awt.event.MouseEvent evt) {
            pnl_sidebarMousePressed(evt);
        }
    });

    lbl_west.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
    lbl_west.setForeground(new java.awt.Color(166, 166, 166));
    lbl_west.setIcon(new javax.swing.ImageIcon(getClass().getResource("/project16/Icons/plus_18px_1.png"))); // NOI18N
    lbl_west.setText("Western Field");
    lbl_west.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mousePressed(java.awt.event.MouseEvent evt) {
            lbl_westMousePressed(evt);
        }
    });

    lbl_north.setBackground(new java.awt.Color(48, 201, 235));
    lbl_north.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
    lbl_north.setForeground(new java.awt.Color(48, 201, 235));
    lbl_north.setIcon(new javax.swing.ImageIcon(getClass().getResource("/project16/Icons/home_18px.png"))); // NOI18N
    lbl_north.setText("Northern Field");
    lbl_north.setToolTipText("");
    lbl_north.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mousePressed(java.awt.event.MouseEvent evt) {
            lbl_northMousePressed(evt);
        }
    });

    lbl_south.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
    lbl_south.setForeground(new java.awt.Color(166, 166, 166));
    lbl_south.setIcon(new javax.swing.ImageIcon(getClass().getResource("/project16/Icons/clock_18px.png"))); // NOI18N
    lbl_south.setText("Southern Field");
    lbl_south.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mousePressed(java.awt.event.MouseEvent evt) {
            lbl_southMousePressed(evt);
        }
    });

    lbl_east.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
    lbl_east.setForeground(new java.awt.Color(166, 166, 166));
    lbl_east.setIcon(new javax.swing.ImageIcon(getClass().getResource("/project16/Icons/search_18px_2.png"))); // NOI18N
    lbl_east.setText("Eastern Field");
    lbl_east.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mousePressed(java.awt.event.MouseEvent evt) {
            lbl_eastMousePressed(evt);
        }
    });

    jPanel1.setBackground(new java.awt.Color(22, 27, 33));

    jLabel2.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
    jLabel2.setForeground(new java.awt.Color(153, 153, 153));
    jLabel2.setText("(c) KeepToo 2017");

    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(75, 75, 75).addComponent(jLabel2)
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap(30, Short.MAX_VALUE).addComponent(jLabel2).addGap(21, 21, 21)));

    jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel3.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/project16/Icons/speech_bubble_25px.png"))); // NOI18N

    javax.swing.GroupLayout pnl_sidebarLayout = new javax.swing.GroupLayout(pnl_sidebar);
    pnl_sidebar.setLayout(pnl_sidebarLayout);
    pnl_sidebarLayout.setHorizontalGroup(pnl_sidebarLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl_sidebarLayout.createSequentialGroup()
                    .addContainerGap(53, Short.MAX_VALUE)
                    .addGroup(pnl_sidebarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    pnl_sidebarLayout.createSequentialGroup().addGroup(pnl_sidebarLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lbl_north, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    168, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lbl_south, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    168, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lbl_west, javax.swing.GroupLayout.PREFERRED_SIZE, 168,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lbl_east, javax.swing.GroupLayout.PREFERRED_SIZE, 168,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGap(24, 24, 24))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    pnl_sidebarLayout.createSequentialGroup()
                                            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 56,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(92, 92, 92)))));
    pnl_sidebarLayout.setVerticalGroup(pnl_sidebarLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnl_sidebarLayout.createSequentialGroup().addGap(56, 56, 56)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 51,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(50, 50, 50)
                    .addComponent(lbl_north, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(lbl_south, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(lbl_west, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(lbl_east, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));

    pnl_chart.setBackground(new java.awt.Color(54, 63, 73));
    pnl_chart.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseDragged(java.awt.event.MouseEvent evt) {
            pnl_chartMouseDragged(evt);
        }
    });
    pnl_chart.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mousePressed(java.awt.event.MouseEvent evt) {
            pnl_chartMousePressed(evt);
        }
    });
    pnl_chart.setLayout(new java.awt.BorderLayout());

    jLabel1.setBackground(new java.awt.Color(34, 41, 50));
    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    jLabel1.setForeground(new java.awt.Color(255, 255, 255));
    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel1.setText("X  ");
    jLabel1.setOpaque(true);
    jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mousePressed(java.awt.event.MouseEvent evt) {
            jLabel1MousePressed(evt);
        }
    });
    pnl_chart.add(jLabel1, java.awt.BorderLayout.PAGE_START);

    jTextField1.setBackground(new java.awt.Color(54, 63, 73));
    jTextField1.setForeground(new java.awt.Color(255, 255, 255));
    jTextField1.setText(" Search");
    jTextField1.setToolTipText("");
    jTextField1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 2, 0));
    jTextField1.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusGained(java.awt.event.FocusEvent evt) {
            jTextField1FocusGained(evt);
        }
    });
    jTextField1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            jTextField1MouseEntered(evt);
        }
    });
    pnl_chart.add(jTextField1, java.awt.BorderLayout.PAGE_END);

    pnl_table.setBackground(new java.awt.Color(255, 255, 255));
    pnl_table.setLayout(new javax.swing.BoxLayout(pnl_table, javax.swing.BoxLayout.LINE_AXIS));

    jScrollPane1.setBackground(new java.awt.Color(255, 255, 255));
    jScrollPane1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(240, 240, 240), 1, true));
    jScrollPane1.setOpaque(false);

    jTable1.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
    jTable1.setForeground(new java.awt.Color(51, 51, 51));
    jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object[][] { { "1", "Lex Fontier", "EA", "TY" }, { "2", "Ryan Reynold", "US", "NY" },
                    { "3", "Jackie Wuan", "CH", "HK" }, { "4", "Monty Rattler", "UK", "LD" } },
            new String[] { "ID", "NAME", "COUNTRY", "STATE" }) {
        Class[] types = new Class[] { java.lang.String.class, java.lang.String.class, java.lang.String.class,
                java.lang.String.class };

        public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
        }
    });
    jTable1.setGridColor(new java.awt.Color(255, 255, 255));
    jTable1.setRowHeight(20);
    jTable1.setSelectionBackground(new java.awt.Color(62, 226, 141));
    jTable1.setShowHorizontalLines(false);
    jTable1.setShowVerticalLines(false);
    jScrollPane1.setViewportView(jTable1);

    pnl_table.add(jScrollPane1);

    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(pnl_sidebar, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnl_chart, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(pnl_table, javax.swing.GroupLayout.DEFAULT_SIZE, 703,
                                    Short.MAX_VALUE))));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnl_sidebar, javax.swing.GroupLayout.DEFAULT_SIZE,
                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(pnl_chart, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(pnl_table,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 396, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    pack();
}

From source file:com.ecrimebureau.Web.JIFPing.java

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

    jSplitPane1 = new javax.swing.JSplitPane();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jTFIP = new javax.swing.JTextField();
    jBPing = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jSpinner1 = new javax.swing.JSpinner();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jSpinnerN = new javax.swing.JSpinner();
    jLabel3 = new javax.swing.JLabel();
    jSpinner3 = new javax.swing.JSpinner();
    jLabel4 = new javax.swing.JLabel();
    jSpinner4 = new javax.swing.JSpinner();

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    setTitle("Ping");
    getContentPane().setLayout(new java.awt.CardLayout());

    jSplitPane1.setDividerLocation(450);

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jScrollPane1.setViewportView(jTextArea1);

    jTFIP.setText("127.0.0.1");

    jBPing.setText("Ping");
    jBPing.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jBPingActionPerformed(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(195, 195, 195).addComponent(jBPing).addGap(0,
                    50, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTFIP, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane1))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jTFIP, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jBPing)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 396, Short.MAX_VALUE)));

    jSplitPane1.setLeftComponent(jPanel2);

    jPanel1.setBorder(null);

    jSpinner1.setToolTipText("Number of times to ping");

    jLabel1.setText("-t");

    jLabel2.setText("-n");

    jSpinnerN.setToolTipText("Number of echo requests to send.");
    jSpinnerN.setValue(5);
    jSpinnerN.setVerifyInputWhenFocusTarget(false);

    jLabel3.setText("-l");

    jLabel4.setText("-f");

    jSpinner4.setToolTipText("Don't Fragment flag in packet (IPv4-only).");

    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.TRAILING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel3)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jSpinnerN, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel4)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(72, 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(jLabel1)
                    .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2).addComponent(jSpinnerN, 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(jLabel3)
                            .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                    .addContainerGap(408, Short.MAX_VALUE)));

    jSplitPane1.setRightComponent(jPanel1);

    getContentPane().add(jSplitPane1, "card2");

    pack();
}

From source file:UserInterface.DonorRole.DonorWorkAreaJPanel.java

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

    titleJLabel = new javax.swing.JLabel();
    donateJLabel = new javax.swing.JLabel();
    donationAmountJTextField = new javax.swing.JTextField();
    dollarJLabel = new javax.swing.JLabel();
    jSeparator1 = new javax.swing.JSeparator();
    donateJButton = new javax.swing.JButton();
    title1JLabel = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    donationJTable = new javax.swing.JTable();
    title3JLabel = new javax.swing.JLabel();
    dollar2JLabel = new javax.swing.JLabel();
    totalDonationJTextField = new javax.swing.JTextField();
    donationOverviewJPanel = new javax.swing.JPanel();
    myDonationJButton = new javax.swing.JButton();
    analysisJButton = new javax.swing.JButton();
    nameJLabel = new javax.swing.JLabel();
    nameDisplayJLabel = new javax.swing.JLabel();
    roleJLabel = new javax.swing.JLabel();
    roleDisplayJLabel = new javax.swing.JLabel();
    changePasswordJButton = new javax.swing.JButton();

    setBackground(new java.awt.Color(255, 255, 255));

    titleJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    titleJLabel.setText("Donation");

    donateJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    donateJLabel.setText("Donate Money");

    donationAmountJTextField.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N

    dollarJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    dollarJLabel.setText("$");

    donateJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    donateJButton.setText("Donate");
    donateJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            donateJButtonActionPerformed(evt);
        }
    });

    title1JLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    title1JLabel.setText("Donation History");

    donationJTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

    }, new String[] { "Donation ID", "Donation Date", "Donation Amount ( in USD $ )" }) {
        boolean[] canEdit = new boolean[] { false, false, false };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    jScrollPane1.setViewportView(donationJTable);
    if (donationJTable.getColumnModel().getColumnCount() > 0) {
        donationJTable.getColumnModel().getColumn(0).setResizable(false);
        donationJTable.getColumnModel().getColumn(1).setResizable(false);
        donationJTable.getColumnModel().getColumn(2).setResizable(false);
    }

    title3JLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    title3JLabel.setText("Total contribution by you:");

    dollar2JLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    dollar2JLabel.setText("$");

    totalDonationJTextField.setEditable(false);
    totalDonationJTextField.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N

    javax.swing.GroupLayout donationOverviewJPanelLayout = new javax.swing.GroupLayout(donationOverviewJPanel);
    donationOverviewJPanel.setLayout(donationOverviewJPanelLayout);
    donationOverviewJPanelLayout.setHorizontalGroup(donationOverviewJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 812, Short.MAX_VALUE));
    donationOverviewJPanelLayout.setVerticalGroup(donationOverviewJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 313, Short.MAX_VALUE));

    myDonationJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    myDonationJButton.setText("My Donation");
    myDonationJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            myDonationJButtonActionPerformed(evt);
        }
    });

    analysisJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    analysisJButton.setText("Organization donation analysis");
    analysisJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            analysisJButtonActionPerformed(evt);
        }
    });

    nameJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    nameJLabel.setText("Welcome:");

    nameDisplayJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N

    roleJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    roleJLabel.setText("Role:");

    roleDisplayJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N

    changePasswordJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    changePasswordJButton.setText("Change Password >>");
    changePasswordJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            changePasswordJButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 812,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createSequentialGroup().addContainerGap()
                                                    .addGroup(layout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addGroup(layout.createSequentialGroup()
                                                                    .addComponent(roleJLabel,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                            107,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                    .addGap(18, 18, 18)
                                                                    .addComponent(roleDisplayJLabel,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                            158,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                                                            .addGroup(layout.createSequentialGroup()
                                                                    .addComponent(nameJLabel,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                            107,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                    .addGap(18, 18, 18)
                                                                    .addComponent(nameDisplayJLabel,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                            158,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE))))
                                            .addGroup(layout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addGroup(layout.createSequentialGroup().addContainerGap()
                                                            .addComponent(title3JLabel)
                                                            .addPreferredGap(
                                                                    javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                            .addComponent(dollar2JLabel).addGap(27, 27, 27)
                                                            .addComponent(totalDonationJTextField,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 137,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout
                                                            .createSequentialGroup().addGap(34, 34, 34)
                                                            .addGroup(layout.createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                                                    .addGroup(layout.createSequentialGroup()
                                                                            .addComponent(myDonationJButton)
                                                                            .addGap(392, 392, 392)
                                                                            .addComponent(analysisJButton))
                                                                    .addComponent(donationOverviewJPanel,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE))))))
                            .addGroup(layout.createSequentialGroup().addGap(376, 376, 376)
                                    .addComponent(title1JLabel)))
                            .addGap(0, 66, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jSeparator1)))
                    .addContainerGap())
            .addGroup(layout.createSequentialGroup().addGap(241, 241, 241).addComponent(donateJLabel)
                    .addGap(40, 40, 40).addComponent(dollarJLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(titleJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 192,
                                    Short.MAX_VALUE)
                            .addComponent(donationAmountJTextField).addComponent(donateJButton,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE))
                    .addGap(18, 18, 18)
                    .addComponent(changePasswordJButton, javax.swing.GroupLayout.PREFERRED_SIZE, 211,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addContainerGap()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(nameJLabel).addComponent(nameDisplayJLabel,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 16,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup().addGap(21, 21, 21)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(titleJLabel).addComponent(changePasswordJButton))))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(roleJLabel)
                            .addComponent(roleDisplayJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 16,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(donateJLabel)
                            .addComponent(donationAmountJTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(dollarJLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(donateJButton).addGap(25, 25, 25)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(title1JLabel).addGap(18, 18, 18)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 132,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(title3JLabel).addComponent(dollar2JLabel)
                            .addComponent(totalDonationJTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(45, 45, 45)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(analysisJButton).addComponent(myDonationJButton))
                    .addGap(18, 18, 18)
                    .addComponent(donationOverviewJPanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(50, 50, 50)));
}

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

    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTextArea2 = new javax.swing.JTextArea();
    button1 = new java.awt.Button();
    button2 = new java.awt.Button();
    jComboBox1 = new javax.swing.JComboBox();
    jButton1 = new javax.swing.JButton();
    jComboBox2 = new javax.swing.JComboBox();
    jButton2 = new javax.swing.JButton();
    jComboBox3 = new javax.swing.JComboBox();
    jButton3 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 335, Short.MAX_VALUE));

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 914, Short.MAX_VALUE));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 341, Short.MAX_VALUE));

    jTextArea1.setEditable(false);
    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jTextArea1.setAutoscrolls(false);
    jScrollPane1.setViewportView(jTextArea1);

    jTextArea2.setEditable(false);
    jTextArea2.setColumns(20);
    jTextArea2.setRows(5);
    jScrollPane2.setViewportView(jTextArea2);

    button1.setLabel("Import Existing");
    button1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            button1ActionPerformed(evt);
        }
    });

    button2.setLabel("Import From Web");
    button2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            button2ActionPerformed(evt);
        }
    });

    jComboBox1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jComboBox1ActionPerformed(evt);
        }
    });

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

    jComboBox2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jComboBox2ActionPerformed(evt);
        }
    });

    jButton2.setText("Pop-Out");
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });

    jComboBox3.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jComboBox3ActionPerformed(evt);
        }
    });

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

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup().addGroup(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(17, 17, 17))
                            .addGroup(layout.createSequentialGroup().addGap(10, 10, 10)
                                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jButton1).addGap(64, 64, 64)))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGroup(layout.createSequentialGroup()
                                            .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jButton2).addGap(0, 0, Short.MAX_VALUE))))
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jButton3)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 255,
                                    Short.MAX_VALUE)
                            .addComponent(jScrollPane1).addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                    layout.createSequentialGroup()
                                            .addComponent(button2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addComponent(jScrollPane1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(
                                            jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 250,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(
                                                    jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jButton1)
                                            .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jButton2))
                                    .addGap(19, 19, 19)
                                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(5, 5, 5)))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(button2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 21,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(18, 18, 18)));

    pack();
}

From source file:com.ecrimebureau.Web.JIFPrefetch.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 ww  . java 2 s  .c  o m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jSplitPane1 = new javax.swing.JSplitPane();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jTFIP = new javax.swing.JTextField();
    jBPrefetch = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jSpinner1 = new javax.swing.JSpinner();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jSpinnerN = new javax.swing.JSpinner();
    jLabel3 = new javax.swing.JLabel();
    jSpinner3 = new javax.swing.JSpinner();
    jLabel4 = new javax.swing.JLabel();
    jSpinner4 = new javax.swing.JSpinner();

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    setTitle("Ping");
    getContentPane().setLayout(new java.awt.CardLayout());

    jSplitPane1.setDividerLocation(450);

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jScrollPane1.setViewportView(jTextArea1);

    jBPrefetch.setText("Select a Prefetch File");
    jBPrefetch.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jBPrefetchActionPerformed(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(195, 195, 195).addComponent(jBPrefetch)
                    .addGap(0, 111, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTFIP, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane1))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jTFIP, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jBPrefetch)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 396, Short.MAX_VALUE)));

    jSplitPane1.setLeftComponent(jPanel2);

    jPanel1.setBorder(null);

    jSpinner1.setToolTipText("Number of times to ping");

    jLabel1.setText("-t");

    jLabel2.setText("-n");

    jSpinnerN.setToolTipText("Number of echo requests to send.");
    jSpinnerN.setValue(5);
    jSpinnerN.setVerifyInputWhenFocusTarget(false);

    jLabel3.setText("-l");

    jLabel4.setText("-f");

    jSpinner4.setToolTipText("Don't Fragment flag in packet (IPv4-only).");

    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.TRAILING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel3)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jSpinnerN, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel4)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            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().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2).addComponent(jSpinnerN, 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(jLabel3)
                            .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                    .addContainerGap(408, Short.MAX_VALUE)));

    jSplitPane1.setRightComponent(jPanel1);

    getContentPane().add(jSplitPane1, "card2");

    pack();
}

From source file:ioheater.ui.IOHeaterUI.java

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

    jFrame1 = new javax.swing.JFrame();
    xYPlot1 = new org.jfree.chart.plot.XYPlot();
    thermometerPlot1 = new org.jfree.chart.plot.ThermometerPlot();
    jToggleButton1 = new javax.swing.JToggleButton();
    xYPlot2 = new org.jfree.chart.plot.XYPlot();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel1 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jLabel4 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    jCheckHeater = new javax.swing.JCheckBox();
    heaterState = new javax.swing.JTextField();
    currentTemperature = new javax.swing.JFormattedTextField();
    targetTemperature = new javax.swing.JFormattedTextField();
    jLabel1 = new javax.swing.JLabel();
    pumpStateLabel = new javax.swing.JLabel();
    spectrometerProximity = new javax.swing.JTextField();
    pumpState = new javax.swing.JTextField();
    jPanel2 = new javax.swing.JPanel();
    tempTolLabel = new javax.swing.JLabel();
    temperatureTrigger = new javax.swing.JTextField();
    jPanel3 = new javax.swing.JPanel();

    javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
    jFrame1.getContentPane().setLayout(jFrame1Layout);
    jFrame1Layout.setHorizontalGroup(jFrame1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE));
    jFrame1Layout.setVerticalGroup(jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE));

    jToggleButton1.setText("jToggleButton1");

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }
    });

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jScrollPane1.setViewportView(jTextArea1);

    jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
    jLabel4.setText("Target Temperature");
    jLabel4.setToolTipText("");
    jLabel4.setMaximumSize(new java.awt.Dimension(81, 40));
    jLabel4.setMinimumSize(new java.awt.Dimension(81, 20));
    jLabel4.setPreferredSize(new java.awt.Dimension(81, 25));

    jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
    jLabel5.setText("Current Temperature");
    jLabel5.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
    jLabel5.setMaximumSize(new java.awt.Dimension(81, 20));
    jLabel5.setMinimumSize(new java.awt.Dimension(81, 20));
    jLabel5.setPreferredSize(new java.awt.Dimension(81, 20));

    jCheckHeater.setText("Heater");
    jCheckHeater.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
    jCheckHeater.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckHeaterActionPerformed(evt);
        }
    });

    heaterState.setEditable(false);
    heaterState.setBackground(new java.awt.Color(0, 0, 0));
    heaterState.setForeground(new java.awt.Color(0, 255, 255));
    heaterState.setText("Off");
    heaterState.setPreferredSize(new java.awt.Dimension(35, 25));

    currentTemperature.setEditable(false);
    currentTemperature.setBackground(new java.awt.Color(0, 0, 0));
    currentTemperature.setForeground(new java.awt.Color(0, 255, 255));
    currentTemperature.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(
            new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
    currentTemperature.setMaximumSize(new java.awt.Dimension(35, 20));
    currentTemperature.setMinimumSize(new java.awt.Dimension(35, 40));
    currentTemperature.setPreferredSize(new java.awt.Dimension(35, 25));

    targetTemperature.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(
            new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
    targetTemperature.setMaximumSize(new java.awt.Dimension(35, 40));
    targetTemperature.setMinimumSize(new java.awt.Dimension(35, 20));
    targetTemperature.setPreferredSize(new java.awt.Dimension(35, 25));

    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
    jLabel1.setText("Spectrometer Proximity");
    jLabel1.setToolTipText("");

    pumpStateLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
    pumpStateLabel.setText("Pump State");
    pumpStateLabel.setToolTipText("");

    spectrometerProximity.setBackground(new java.awt.Color(0, 0, 0));
    spectrometerProximity.setForeground(new java.awt.Color(0, 255, 255));
    spectrometerProximity.setText("Off");
    spectrometerProximity.setMinimumSize(new java.awt.Dimension(6, 25));
    spectrometerProximity.setName(""); // NOI18N
    spectrometerProximity.setPreferredSize(new java.awt.Dimension(35, 35));
    spectrometerProximity.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            spectrometerProximityActionPerformed(evt);
        }
    });

    pumpState.setBackground(new java.awt.Color(0, 0, 0));
    pumpState.setForeground(new java.awt.Color(0, 255, 255));
    pumpState.setText("Off");
    pumpState.setToolTipText("");
    pumpState.setPreferredSize(new java.awt.Dimension(35, 25));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, 692, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 116,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(currentTemperature, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addGroup(jPanel1Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jCheckHeater)
                                            .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel1Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(heaterState, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    35, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(targetTemperature,
                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGap(61, 61, 61)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(pumpStateLabel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(spectrometerProximity, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            39, Short.MAX_VALUE)
                                    .addComponent(pumpState, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(spectrometerProximity, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
                            Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(currentTemperature, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(targetTemperature, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pumpStateLabel).addComponent(pumpState,
                                    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(jCheckHeater).addComponent(heaterState,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18).addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 312,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    jTabbedPane1.addTab("Main", jPanel1);

    tempTolLabel.setText("Temperature tolerance");

    temperatureTrigger.setText("10");
    temperatureTrigger.setToolTipText("");
    temperatureTrigger.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            temperatureTriggerActionPerformed(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().addContainerGap().addComponent(tempTolLabel)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(temperatureTrigger, javax.swing.GroupLayout.PREFERRED_SIZE, 24,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(554, Short.MAX_VALUE)));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(temperatureTrigger, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tempTolLabel))
                    .addContainerGap(397, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Settings", jPanel2);

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 702, Short.MAX_VALUE));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 428, Short.MAX_VALUE));

    jTabbedPane1.addTab("Graph", jPanel3);

    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(jTabbedPane1).addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                    layout.createSequentialGroup().addComponent(jTabbedPane1,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE)));

    pack();
}

From source file:com.emr.mappings.MappingsForm.java

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

    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    tblMappings = new javax.swing.JTable();
    jToolBar1 = new javax.swing.JToolBar();
    btnSave = new javax.swing.JButton();
    jSeparator1 = new javax.swing.JToolBar.Separator();
    btnCancel = new javax.swing.JButton();

    setClosable(true);
    setIconifiable(true);
    setTitle("Mappings");

    jLabel1.setText(
            "<html><b color='green'>Mappings defined here will be applied to all Source data before it is copied to the destination.</b><br /><i color='blue'>Double click to edit</i></html>");

    tblMappings.setModel(model);
    jScrollPane1.setViewportView(tblMappings);

    jToolBar1.setRollover(true);

    btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/save.png"), ""));
    btnSave.setText("Save");
    btnSave.setFocusable(false);
    btnSave.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
    btnSave.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveActionPerformed(evt);
        }
    });
    jToolBar1.add(btnSave);
    jToolBar1.add(jSeparator1);

    btnCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cancel.png"), ""));
    btnCancel.setText("Cancel");
    btnCancel.setToolTipText("");
    btnCancel.setFocusable(false);
    btnCancel.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
    btnCancel.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
        }
    });
    jToolBar1.add(btnCancel);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(54, Short.MAX_VALUE))
            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING).addComponent(jToolBar1,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 261,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                            javax.swing.GroupLayout.PREFERRED_SIZE)));

    pack();
}

From source file:UserInterface.PoorPeopleRole.PoorPeopleWorkAreaJPanel.java

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

    titleJLabel = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    transactionJTable = new javax.swing.JTable();
    balanceJLabel = new javax.swing.JLabel();
    balanceJTextField = new javax.swing.JTextField();
    transferMoneyPPJButton = new javax.swing.JButton();
    changPinJButton = new javax.swing.JButton();
    newPinJLabel = new javax.swing.JLabel();
    mainJPasswordField = new javax.swing.JPasswordField();
    conPinJLabel = new javax.swing.JLabel();
    confirmJPasswordField = new javax.swing.JPasswordField();
    updatePinJButton = new javax.swing.JButton();
    transferMoneyRSJButton = new javax.swing.JButton();
    transactionJPanel = new javax.swing.JPanel();
    moneyReceivedJButton = new javax.swing.JButton();
    maoneyTransferedJButton = new javax.swing.JButton();
    nameJLabel = new javax.swing.JLabel();
    nameDisplayJLabel = new javax.swing.JLabel();
    roleJLabel = new javax.swing.JLabel();
    roleDisplayJLabel = new javax.swing.JLabel();
    changePasswordJButton = new javax.swing.JButton();

    setBackground(new java.awt.Color(255, 255, 255));

    titleJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    titleJLabel.setText("Transaction History");

    transactionJTable.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    transactionJTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

    }, new String[] { "Transaction ID", "Source", "Source User Account", "Destination User Account",
            "Destination", "Type", "Mode", "Amount", "Date" }) {
        boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    jScrollPane1.setViewportView(transactionJTable);

    balanceJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    balanceJLabel.setText("Balance:");

    balanceJTextField.setEditable(false);
    balanceJTextField.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N

    transferMoneyPPJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    transferMoneyPPJButton.setText("Transfer Money to Person >>");
    transferMoneyPPJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            transferMoneyPPJButtonActionPerformed(evt);
        }
    });

    changPinJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    changPinJButton.setText("Update PIN");
    changPinJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            changPinJButtonActionPerformed(evt);
        }
    });

    newPinJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    newPinJLabel.setText("New PIN");

    mainJPasswordField.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    mainJPasswordField.setEnabled(false);

    conPinJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    conPinJLabel.setText("Confirm PIN");

    confirmJPasswordField.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    confirmJPasswordField.setEnabled(false);

    updatePinJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    updatePinJButton.setText("Update");
    updatePinJButton.setEnabled(false);
    updatePinJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            updatePinJButtonActionPerformed(evt);
        }
    });

    transferMoneyRSJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    transferMoneyRSJButton.setText("Purchase goods from Registered Site >>");
    transferMoneyRSJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            transferMoneyRSJButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout transactionJPanelLayout = new javax.swing.GroupLayout(transactionJPanel);
    transactionJPanel.setLayout(transactionJPanelLayout);
    transactionJPanelLayout.setHorizontalGroup(transactionJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 951, Short.MAX_VALUE));
    transactionJPanelLayout.setVerticalGroup(transactionJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 215, Short.MAX_VALUE));

    moneyReceivedJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    moneyReceivedJButton.setText("Money Received");
    moneyReceivedJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            moneyReceivedJButtonActionPerformed(evt);
        }
    });

    maoneyTransferedJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    maoneyTransferedJButton.setText("Money Transfered");
    maoneyTransferedJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            maoneyTransferedJButtonActionPerformed(evt);
        }
    });

    nameJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    nameJLabel.setText("Welcome:");

    nameDisplayJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N

    roleJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    roleJLabel.setText("Role:");

    roleDisplayJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N

    changePasswordJButton.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
    changePasswordJButton.setText("Change Password >>");
    changePasswordJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            changePasswordJButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(roleJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 107,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(roleDisplayJLabel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            158, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(130, 130, 130).addComponent(titleJLabel))
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(nameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 107,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(nameDisplayJLabel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            158, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(changePasswordJButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            211, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(layout.createSequentialGroup().addGap(37, 37, 37).addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup().addComponent(moneyReceivedJButton)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(maoneyTransferedJButton))
                            .addComponent(transactionJPanel, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(newPinJLabel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    93, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(conPinJLabel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    138, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(38, 38, 38)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                    false)
                                            .addComponent(mainJPasswordField,
                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(confirmJPasswordField,
                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(changPinJButton,
                                                    javax.swing.GroupLayout.Alignment.LEADING,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 181,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(updatePinJButton,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 181,
                                                    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)
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                    layout.createSequentialGroup().addComponent(balanceJLabel)
                                                            .addGap(18, 18, 18).addComponent(balanceJTextField,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 212,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                    layout.createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.LEADING, false)
                                                            .addComponent(transferMoneyRSJButton,
                                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                    Short.MAX_VALUE)
                                                            .addComponent(transferMoneyPPJButton,
                                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                    Short.MAX_VALUE))))
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.PREFERRED_SIZE, 951,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGap(128, 128, 128)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(nameJLabel).addComponent(nameDisplayJLabel,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 16,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(roleJLabel).addComponent(roleDisplayJLabel,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 16,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            layout.createSequentialGroup().addComponent(changePasswordJButton)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(titleJLabel).addGap(2, 2, 2)))
                    .addGap(27, 27, 27)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE)
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup().addComponent(transferMoneyPPJButton)
                                            .addGap(26, 26, 26).addComponent(transferMoneyRSJButton))
                            .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(changPinJButton).addComponent(balanceJLabel)
                                            .addComponent(balanceJTextField,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(18, 18, 18)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(mainJPasswordField,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(newPinJLabel))
                                    .addGap(18, 18, 18)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(confirmJPasswordField,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(conPinJLabel))
                                    .addGap(18, 18, 18).addComponent(updatePinJButton)))
                    .addGap(32, 32, 32)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(moneyReceivedJButton).addComponent(maoneyTransferedJButton))
                    .addGap(18, 18, 18)
                    .addComponent(transactionJPanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
}

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

    jPanel1 = new javax.swing.JPanel();
    mainTitleLbl = new javax.swing.JLabel();
    jSeparator1 = new javax.swing.JSeparator();
    exitButton = new javax.swing.JButton();
    exportButton = new javax.swing.JButton();
    dailyLogPanel = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    dailyLogTable = new javax.swing.JTable();
    addButton = new javax.swing.JButton();
    analysisPanel = new javax.swing.JPanel();
    netDurationLbl = new javax.swing.JLabel();
    durationLbl = new javax.swing.JLabel();
    monthlyRequiredDurationLbl = new javax.swing.JLabel();
    monthlyDurationLbl = new javax.swing.JLabel();
    durationDifferenceLbl = new javax.swing.JLabel();
    differenceLbl = new javax.swing.JLabel();
    monthCombo = new javax.swing.JComboBox();
    yearCombo = new javax.swing.JComboBox();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    jPanel1.setMaximumSize(new java.awt.Dimension(395, 389));
    jPanel1.setMinimumSize(new java.awt.Dimension(395, 389));
    jPanel1.setPreferredSize(new java.awt.Dimension(464, 474));

    mainTitleLbl.setFont(new java.awt.Font("Arial", 0, 36)); // NOI18N
    mainTitleLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    mainTitleLbl.setText("Daily Log Manager");
    mainTitleLbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

    exitButton.setText("Exit");
    exitButton.setMaximumSize(new java.awt.Dimension(72, 29));
    exitButton.setMinimumSize(new java.awt.Dimension(72, 29));
    exitButton.setPreferredSize(new java.awt.Dimension(72, 29));
    exitButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitButtonActionPerformed(evt);
        }
    });

    exportButton.setText("Export");
    exportButton.setMaximumSize(new java.awt.Dimension(92, 29));
    exportButton.setMinimumSize(new java.awt.Dimension(92, 29));
    exportButton.setPreferredSize(new java.awt.Dimension(92, 29));
    exportButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportButtonActionPerformed(evt);
        }
    });

    dailyLogPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Daily Logs"));
    dailyLogPanel.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    dailyLogPanel.setName("Daily Log Entry"); // NOI18N
    dailyLogPanel.setPreferredSize(new java.awt.Dimension(240, 190));

    jScrollPane1.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N

    dailyLogTable
            .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" }));
    jScrollPane1.setViewportView(dailyLogTable);

    javax.swing.GroupLayout dailyLogPanelLayout = new javax.swing.GroupLayout(dailyLogPanel);
    dailyLogPanel.setLayout(dailyLogPanelLayout);
    dailyLogPanelLayout.setHorizontalGroup(
            dailyLogPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 770, Short.MAX_VALUE));
    dailyLogPanelLayout
            .setVerticalGroup(dailyLogPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE));

    addButton.setText("Add");
    addButton.setMaximumSize(new java.awt.Dimension(72, 29));
    addButton.setMinimumSize(new java.awt.Dimension(72, 29));
    addButton.setPreferredSize(new java.awt.Dimension(72, 29));
    addButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addButtonActionPerformed(evt);
        }
    });

    analysisPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Analysis"));

    netDurationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
    netDurationLbl.setText("NET DURATION:");

    durationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N

    monthlyRequiredDurationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
    monthlyRequiredDurationLbl.setText("MONTHLY REQUIRED DURATION:");

    monthlyDurationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N

    durationDifferenceLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
    durationDifferenceLbl.setText("DIFFERENCE:");

    differenceLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N

    javax.swing.GroupLayout analysisPanelLayout = new javax.swing.GroupLayout(analysisPanel);
    analysisPanel.setLayout(analysisPanelLayout);
    analysisPanelLayout.setHorizontalGroup(analysisPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(analysisPanelLayout.createSequentialGroup().addContainerGap().addGroup(analysisPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(analysisPanelLayout.createSequentialGroup().addComponent(netDurationLbl)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(durationLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(
                            analysisPanelLayout.createSequentialGroup().addComponent(monthlyRequiredDurationLbl)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(monthlyDurationLbl, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            71, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(analysisPanelLayout.createSequentialGroup().addComponent(durationDifferenceLbl)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(differenceLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(18, Short.MAX_VALUE)));
    analysisPanelLayout
            .setVerticalGroup(analysisPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(analysisPanelLayout.createSequentialGroup().addContainerGap()
                            .addGroup(analysisPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(netDurationLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(durationLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(analysisPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(monthlyDurationLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(monthlyRequiredDurationLbl))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(analysisPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(differenceLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(durationDifferenceLbl))
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    netDurationLbl.getAccessibleContext().setAccessibleName("netDurationLbl");
    durationLbl.getAccessibleContext().setAccessibleName("durationLbl");
    monthlyRequiredDurationLbl.getAccessibleContext().setAccessibleName("monthlyRequiredDurationLbl");
    monthlyDurationLbl.getAccessibleContext().setAccessibleName("monthlyDurationLbl");
    durationDifferenceLbl.getAccessibleContext().setAccessibleName("durationDifferenceLbl");
    differenceLbl.getAccessibleContext().setAccessibleName("differenceLbl");

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

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

    jLabel1.setText("Month:");

    jLabel2.setText("Year:");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jSeparator1)
            .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(addButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(6, 6, 6)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addComponent(analysisPanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jLabel1)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(monthCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(24, 24, 24).addComponent(jLabel2)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(yearCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(mainTitleLbl, javax.swing.GroupLayout.Alignment.TRAILING,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(dailyLogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 788,
                                            Short.MAX_VALUE))))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addComponent(mainTitleLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(dailyLogPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 206,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(analysisPanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(monthCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(yearCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel1).addComponent(jLabel2)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 6,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(addButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    exportButton.getAccessibleContext().setAccessibleName("exportButton");
    addButton.getAccessibleContext().setAccessibleName("addButton");
    analysisPanel.getAccessibleContext().setAccessibleName("analysisPanel");
    jLabel1.getAccessibleContext().setAccessibleName("monthLbl");
    jLabel2.getAccessibleContext().setAccessibleName("yearLbl");

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

    pack();
}

From source file:Main.java

public Main() {
    Container pane = getContentPane();
    GroupLayout gl = new GroupLayout(pane);
    pane.setLayout(gl);//from   w  w w .j  av  a  2  s  . co  m

    JLabel avLbl = new JLabel("Available");
    JLabel tagsLbl = new JLabel("Tags");
    JLabel selLbl = new JLabel("Selected");

    JButton newBtn = new JButton("New");
    JButton moveBtn = new JButton(">>");
    JButton remBtn = new JButton("Remove");

    JList leftList = new JList();
    JScrollPane spleft = new JScrollPane(leftList);
    JList rightList = new JList();
    JScrollPane spright = new JScrollPane(rightList);

    gl.setAutoCreateGaps(true);
    gl.setAutoCreateContainerGaps(true);

    gl.setHorizontalGroup(gl.createParallelGroup(CENTER).addComponent(tagsLbl)
            .addGroup(gl.createSequentialGroup()
                    .addGroup(gl.createParallelGroup(CENTER).addComponent(avLbl)
                            .addComponent(spleft, 100, 200, Short.MAX_VALUE).addComponent(newBtn))
                    .addComponent(moveBtn).addGroup(gl.createParallelGroup(CENTER).addComponent(selLbl)
                            .addComponent(spright, 100, 200, Short.MAX_VALUE).addComponent(remBtn))));
    gl.setVerticalGroup(gl.createSequentialGroup().addComponent(tagsLbl)
            .addGroup(gl.createParallelGroup(CENTER)
                    .addGroup(gl.createSequentialGroup().addComponent(avLbl)
                            .addComponent(spleft, 100, 250, Short.MAX_VALUE).addComponent(newBtn))
                    .addComponent(moveBtn).addGroup(gl.createSequentialGroup().addComponent(selLbl)
                            .addComponent(spright, 100, 250, Short.MAX_VALUE).addComponent(remBtn))));
    pack();
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}