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:udea.edu.com.co.grafico.Graficas.java

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    labelYk = new javax.swing.JLabel();
    capas = new javax.swing.JLayeredPane();
    lineas = new javax.swing.JPanel();
    jDesktopPane1 = new javax.swing.JDesktopPane();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    datos = new javax.swing.JTable();
    textBeta1 = new javax.swing.JTextField();
    textErreXY = new javax.swing.JTextField();
    textErre2 = new javax.swing.JTextField();
    jLabel5 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    textBeta0 = new javax.swing.JTextField();
    textYk = new javax.swing.JTextField();
    btnCalcularYk = new javax.swing.JButton();
    textResultYk = new javax.swing.JTextField();
    labelResultYk = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    labelYk1 = new javax.swing.JLabel();

    labelYk.setText("X(k)");

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

    capas.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

    javax.swing.GroupLayout lineasLayout = new javax.swing.GroupLayout(lineas);
    lineas.setLayout(lineasLayout);/*from ww w .  j  a  va  2s .c om*/
    lineasLayout.setHorizontalGroup(lineasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 466, Short.MAX_VALUE));
    lineasLayout.setVerticalGroup(lineasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    capas.setLayer(lineas, javax.swing.JLayeredPane.DEFAULT_LAYER);

    javax.swing.GroupLayout capasLayout = new javax.swing.GroupLayout(capas);
    capas.setLayout(capasLayout);
    capasLayout.setHorizontalGroup(capasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(capasLayout.createSequentialGroup().addContainerGap().addComponent(lineas,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    capasLayout.setVerticalGroup(capasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(capasLayout.createSequentialGroup().addContainerGap().addComponent(lineas,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    jDesktopPane1.setBackground(new java.awt.Color(204, 204, 255));
    jDesktopPane1.setBorder(javax.swing.BorderFactory.createCompoundBorder());

    jButton1.setBackground(new java.awt.Color(0, 51, 102));
    jButton1.setForeground(new java.awt.Color(255, 255, 255));
    jButton1.setText("Graficar");
    jButton1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    jButton2.setBackground(new java.awt.Color(0, 51, 102));
    jButton2.setForeground(new java.awt.Color(255, 255, 255));
    jButton2.setText("Cargar datos");
    jButton2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });

    jDesktopPane1.setLayer(jButton1, javax.swing.JLayeredPane.DEFAULT_LAYER);
    jDesktopPane1.setLayer(jButton2, javax.swing.JLayeredPane.DEFAULT_LAYER);

    javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1);
    jDesktopPane1.setLayout(jDesktopPane1Layout);
    jDesktopPane1Layout.setHorizontalGroup(
            jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jDesktopPane1Layout.createSequentialGroup().addContainerGap()
                            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 91,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 89,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));
    jDesktopPane1Layout
            .setVerticalGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jDesktopPane1Layout.createSequentialGroup().addGap(19, 19, 19)
                            .addGroup(jDesktopPane1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addContainerGap(21, Short.MAX_VALUE)));

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

    }, new String[] {

    }));
    jScrollPane1.setViewportView(datos);

    textBeta1.setEditable(false);
    textBeta1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            textBeta1ActionPerformed(evt);
        }
    });

    textErreXY.setEditable(false);
    textErreXY.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            textErreXYActionPerformed(evt);
        }
    });

    textErre2.setEditable(false);
    textErre2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            textErre2ActionPerformed(evt);
        }
    });

    jLabel5.setText("r(x,y)");

    jLabel3.setText("Beta 0");

    jLabel4.setText("Beta 1");

    textBeta0.setEditable(false);
    textBeta0.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            textBeta0ActionPerformed(evt);
        }
    });

    textYk.setText(" ");
    textYk.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            textYkActionPerformed(evt);
        }
    });

    btnCalcularYk.setFont(new java.awt.Font("Times New Roman", 0, 10)); // NOI18N
    btnCalcularYk.setText("Y(k)");
    btnCalcularYk.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCalcularYkActionPerformed(evt);
        }
    });

    textResultYk.setEditable(false);
    textResultYk.setText(" ");
    textResultYk.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            textResultYkActionPerformed(evt);
        }
    });

    labelResultYk.setText("Resultado Y(k)");

    jLabel6.setText("r^2");

    labelYk1.setText("X(k)");

    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().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jDesktopPane1)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            layout.createSequentialGroup().addComponent(jLabel3)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(textBeta0, javax.swing.GroupLayout.PREFERRED_SIZE, 101,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            layout.createSequentialGroup().addComponent(jLabel4)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(textBeta1, javax.swing.GroupLayout.PREFERRED_SIZE, 101,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            layout.createSequentialGroup().addComponent(jLabel5)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(
                                            textErreXY, javax.swing.GroupLayout.PREFERRED_SIZE, 101,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelResultYk).addComponent(jLabel6).addComponent(labelYk1))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(textResultYk, javax.swing.GroupLayout.PREFERRED_SIZE, 101,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                    false)
                                            .addGroup(layout.createSequentialGroup()
                                                    .addComponent(textYk,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 48,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(2, 2, 2).addComponent(btnCalcularYk,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            Short.MAX_VALUE))
                                            .addComponent(textErre2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    101, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGap(18, 18, 18)
                    .addComponent(capas, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, 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().addGap(20, 20, 20).addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(capas)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 207,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3).addComponent(textBeta0,
                                            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.BASELINE)
                                    .addComponent(textBeta1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel4))
                            .addGap(7, 7, 7)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(textErreXY, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel5))
                            .addGap(12, 12, 12)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(textErre2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel6))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(textYk, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(btnCalcularYk).addComponent(labelYk1))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(textResultYk, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(labelResultYk))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap()));

    pack();
}

From source file:fitmon.WorkoutLog.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() {

    jPanel1 = new javax.swing.JPanel();
    fit = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();
    minutes = new javax.swing.JSlider();
    min = new javax.swing.JLabel();
    cal = new javax.swing.JLabel();
    callo = new javax.swing.JTextField();
    level = new javax.swing.JComboBox();
    inten = new javax.swing.JLabel();
    add = new javax.swing.JButton();
    addanother = new javax.swing.JButton();
    table = new javax.swing.JScrollPane();
    tab = new javax.swing.JTable();
    log_wkt = new javax.swing.JButton();
    wkt_head = new javax.swing.JLabel();
    time = new com.toedter.calendar.JDateChooser();
    cancelButton = new javax.swing.JButton();
    img = new javax.swing.JLabel();
    jLabel1 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setName("wktlog"); // NOI18N

    jPanel1.setLayout(null);

    jPanel1.add(fit);
    fit.setBounds(20, 100, 160, 40);

    jLabel2.setFont(new java.awt.Font("Microsoft Sans Serif", 2, 14)); // NOI18N
    jLabel2.setText("Select Workout");
    jPanel1.add(jLabel2);
    jLabel2.setBounds(30, 80, 140, 20);

    minutes.setMajorTickSpacing(30);
    minutes.setMaximum(300);
    minutes.setMinorTickSpacing(5);
    minutes.setPaintLabels(true);
    minutes.setPaintTicks(true);
    minutes.setValue(0);
    jPanel1.add(minutes);
    minutes.setBounds(210, 100, 400, 40);

    min.setFont(new java.awt.Font("Microsoft Sans Serif", 2, 14)); // NOI18N
    min.setText("Minutes");
    jPanel1.add(min);
    min.setBounds(220, 80, 110, 16);

    cal.setFont(new java.awt.Font("Microsoft Sans Serif", 2, 14)); // NOI18N
    cal.setText("Clories Burned");
    jPanel1.add(cal);
    cal.setBounds(30, 140, 130, 20);

    callo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            calloActionPerformed(evt);
        }
    });
    jPanel1.add(callo);
    callo.setBounds(20, 170, 150, 30);

    level.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Low", "Moderate", "High" }));
    jPanel1.add(level);
    level.setBounds(210, 170, 90, 30);

    inten.setFont(new java.awt.Font("Microsoft Sans Serif", 2, 14)); // NOI18N
    inten.setText("Intensity");
    jPanel1.add(inten);
    inten.setBounds(220, 140, 100, 20);

    add.setText("add ");
    jPanel1.add(add);
    add.setBounds(50, 230, 80, 30);

    addanother.setText("add another workout");
    addanother.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            addAnotherButton(evt);
        }
    });
    addanother.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addanotherActionPerformed(evt);
        }
    });
    jPanel1.add(addanother);
    addanother.setBounds(160, 230, 160, 23);

    tab.setBackground(new java.awt.Color(204, 204, 255));
    tab.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

    }, new String[] { "Workout", "Minutes", "Intensity", "Calories Burned", "Edit" }));
    tab.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            removeItem(evt);
        }
    });
    table.setViewportView(tab);

    jPanel1.add(table);
    table.setBounds(20, 280, 900, 190);

    log_wkt.setBackground(new java.awt.Color(204, 204, 255));
    log_wkt.setFont(new java.awt.Font("Calibri Light", 1, 14)); // NOI18N
    log_wkt.setText("Save Workout");
    log_wkt.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            logWorkout(evt);
        }
    });
    jPanel1.add(log_wkt);
    log_wkt.setBounds(590, 530, 140, 40);

    wkt_head.setFont(new java.awt.Font("Calibri Light", 1, 20)); // NOI18N
    wkt_head.setText("Log your workout for:");
    jPanel1.add(wkt_head);
    wkt_head.setBounds(200, 20, 220, 40);
    jPanel1.add(time);
    time.setBounds(410, 20, 200, 40);

    cancelButton.setFont(new java.awt.Font("Calibri Light", 1, 14)); // NOI18N
    cancelButton.setText("Cancel");
    cancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelButtonActionPerformed(evt);
        }
    });
    jPanel1.add(cancelButton);
    cancelButton.setBounds(770, 530, 140, 40);

    img.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/new.png"))); // NOI18N
    jPanel1.add(img);
    img.setBounds(0, 0, 940, 600);

    jLabel1.setText("jLabel1");
    jPanel1.add(jLabel1);
    jLabel1.setBounds(210, 30, 34, 14);

    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()
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 938, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
            jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 601,
            Short.MAX_VALUE));

    pack();
}

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

    jFrame1 = new javax.swing.JFrame();
    Place = new javax.swing.JComboBox();
    Year = new javax.swing.JComboBox();
    But_tmax = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    CrearData = new javax.swing.JButton();
    jLabel3 = new javax.swing.JLabel();
    But_tmin = new javax.swing.JButton();
    But_af = new javax.swing.JButton();
    But_rain = new javax.swing.JButton();
    But_sun = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    tmax_v = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    tmin_v = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    af_v = new javax.swing.JLabel();
    jLabel8 = new javax.swing.JLabel();
    rain_v = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    sun_v = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    CrearData1 = new javax.swing.JButton();
    jLabel10 = new javax.swing.JLabel();

    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));

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    Place.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "aberporth", "armagh", "ballypatrick",
            "bradford", "braemar", "camborne", "cambridge", "cardiff", "chivenor", "cwmystwyth", "dunstaffnage",
            "durham", "eastbourne", "eskdalemuir", "heathrow", "hurn", "lerwick", "leuchars", "lowestoft",
            "manston", "nairn", "newton", "oxford", "paisley", "rossonwye", "ringway", "shawbury", "sheffield",
            "southampton", "stornoway", "suttonbonington", "tiree", "valley", "waddington", "whitby",
            "wickairport", "yeovilton" }));
    Place.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            PlaceActionPerformed(evt);
        }
    });

    But_tmax.setText("Temperatura Maxima");
    But_tmax.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            But_tmaxActionPerformed(evt);
        }
    });

    jLabel1.setFont(new java.awt.Font("Tahoma", 3, 11)); // NOI18N
    jLabel1.setText("Lugar");

    jLabel2.setFont(new java.awt.Font("Tahoma", 3, 11)); // NOI18N
    jLabel2.setText("Ao");

    CrearData.setText("Cargar Lugar");
    CrearData.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            CrearDataActionPerformed(evt);
        }
    });

    jLabel3.setFont(new java.awt.Font("Tahoma", 3, 11)); // NOI18N
    jLabel3.setText("Graficos");

    But_tmin.setText("Temperatura Minima");
    But_tmin.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            But_tminActionPerformed(evt);
        }
    });

    But_af.setText("Dias de Heladas");
    But_af.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            But_afActionPerformed(evt);
        }
    });

    But_rain.setText("Lluvia Recogida");
    But_rain.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            But_rainActionPerformed(evt);
        }
    });

    But_sun.setText("Horas de Sol");
    But_sun.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            But_sunActionPerformed(evt);
        }
    });

    tmax_v.setText("---");

    jLabel5.setText("Temperatura Max:");

    jLabel6.setText("Temperatura Min:");

    tmin_v.setText("---");

    jLabel7.setText("Dias de Heladas:");

    af_v.setText("---");

    jLabel8.setText("Lluvia Recogida:");

    rain_v.setText("---");

    jLabel9.setText("Dias de Sol:");

    sun_v.setText("---");

    jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    jLabel4.setText("Media anual");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                    jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(
                                                    jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jLabel7, 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)
                                                    .addGroup(jPanel1Layout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addComponent(af_v,
                                                                    javax.swing.GroupLayout.Alignment.TRAILING)
                                                            .addComponent(tmin_v,
                                                                    javax.swing.GroupLayout.Alignment.TRAILING)
                                                            .addComponent(tmax_v,
                                                                    javax.swing.GroupLayout.Alignment.TRAILING))
                                                    .addComponent(rain_v).addComponent(sun_v))
                                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    Short.MAX_VALUE))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel4)
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jLabel4)
                    .addGap(21, 21, 21)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5).addComponent(tmax_v))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6).addComponent(tmin_v))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7).addComponent(af_v))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8).addComponent(rain_v))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9).addComponent(sun_v))
                    .addContainerGap()));

    CrearData1.setText("Obtener Estadsticas");
    CrearData1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            CrearData1ActionPerformed(evt);
        }
    });

    jLabel10.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/rsz_umbrella_png494.png"))); // NOI18N
    jLabel10.setText("UK Weather");

    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().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addGroup(
                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(But_tmax, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(CrearData, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(But_tmin, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(But_af, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 57,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup().addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(But_rain, javax.swing.GroupLayout.PREFERRED_SIZE, 133,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(But_sun, javax.swing.GroupLayout.PREFERRED_SIZE, 133,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGap(0, 0, Short.MAX_VALUE))
                                    .addComponent(CrearData1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup().addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(Place, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(Year, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 44,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
                                    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)))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(Place, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(Year, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jPanel1, 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(CrearData).addComponent(CrearData1))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel3)
                    .addGap(5, 5, 5)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(But_tmax).addComponent(But_rain))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(But_tmin).addComponent(But_sun))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(But_af)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pack();
}

From source file:RLCcircuit.RLCcircuitJFrame.java

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    backgroundPanel = new javax.swing.JPanel();
    displayPanel = new javax.swing.JPanel();
    circuitImage = new javax.swing.JLabel();
    graphPanel = new GraphViewPanel(getResultChart());
    impedanceLabel = new javax.swing.JLabel();
    phaseAngleLabel = new javax.swing.JLabel();
    impedanceNumber = new javax.swing.JLabel();
    phaseAngleNumber = new javax.swing.JLabel();
    phaseAngleUnit = new javax.swing.JLabel();
    impedanceUnit = new javax.swing.JLabel();
    settingPanel = new javax.swing.JPanel();
    startButton = new javax.swing.JButton();
    resistanceLabel = new javax.swing.JLabel();
    resistanceSlider = new javax.swing.JSlider();
    resistanceNumber = new javax.swing.JTextField();
    inductanceLabel = new javax.swing.JLabel();
    inductanceSlider = new javax.swing.JSlider();
    inductanceNumber = new javax.swing.JTextField();
    capacitanceSlider = new javax.swing.JSlider();
    capacitanceLabel = new javax.swing.JLabel();
    capacitanceNumber = new javax.swing.JTextField();
    voltageLabel = new javax.swing.JLabel();
    voltageNumber = new javax.swing.JTextField();
    voltageSlider = new javax.swing.JSlider();
    frequencyLabel = new javax.swing.JLabel();
    frequencyNumber = new javax.swing.JTextField();
    frequencySlider = new javax.swing.JSlider();
    resistanceUnit = new javax.swing.JLabel();
    inductanceUnit = new javax.swing.JLabel();
    capacitanceUnit = new javax.swing.JLabel();
    voltageUnit = new javax.swing.JLabel();
    frequencyUnit = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setBounds(new java.awt.Rectangle(0, 0, 600, 500));
    setMinimumSize(new java.awt.Dimension(600, 500));

    backgroundPanel.setMinimumSize(new java.awt.Dimension(600, 500));
    backgroundPanel.setLayout(null);//w w w  .  j  av a  2 s  .  c  o  m

    displayPanel.setLayout(null);

    circuitImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/RLCcircuit/RLC.png"))); // NOI18N
    displayPanel.add(circuitImage);
    circuitImage.setBounds(10, 20, 300, 160);

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

    javax.swing.GroupLayout graphPanelLayout = new javax.swing.GroupLayout(graphPanel);
    graphPanel.setLayout(graphPanelLayout);
    graphPanelLayout.setHorizontalGroup(graphPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 396, Short.MAX_VALUE));
    graphPanelLayout.setVerticalGroup(graphPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 286, Short.MAX_VALUE));

    displayPanel.add(graphPanel);
    graphPanel.setBounds(0, 210, 400, 290);

    impedanceLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    impedanceLabel.setText("Impedance:");
    displayPanel.add(impedanceLabel);
    impedanceLabel.setBounds(240, 150, 80, 15);

    phaseAngleLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    phaseAngleLabel.setText("Phase angle:");
    displayPanel.add(phaseAngleLabel);
    phaseAngleLabel.setBounds(240, 170, 80, 15);

    impedanceNumber.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    impedanceNumber.setText("0");
    displayPanel.add(impedanceNumber);
    impedanceNumber.setBounds(330, 150, 50, 15);

    phaseAngleNumber.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    phaseAngleNumber.setText("0");
    displayPanel.add(phaseAngleNumber);
    phaseAngleNumber.setBounds(330, 170, 50, 15);

    phaseAngleUnit.setText(" ");
    displayPanel.add(phaseAngleUnit);
    phaseAngleUnit.setBounds(380, 170, 20, 15);

    impedanceUnit.setText("");
    displayPanel.add(impedanceUnit);
    impedanceUnit.setBounds(380, 150, 10, 15);

    backgroundPanel.add(displayPanel);
    displayPanel.setBounds(0, 0, 400, 500);

    settingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Setting"));
    settingPanel.setLayout(null);

    startButton.setText("Start");
    startButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            startButtonActionPerformed(evt);
        }
    });
    settingPanel.add(startButton);
    startButton.setBounds(80, 40, 57, 23);

    resistanceLabel.setText("Resistance");
    settingPanel.add(resistanceLabel);
    resistanceLabel.setBounds(70, 100, 70, 15);

    resistanceSlider.setMinimum(1);
    resistanceSlider.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            resistanceSliderStateChanged(evt);
        }
    });
    settingPanel.add(resistanceSlider);
    resistanceSlider.setBounds(10, 120, 120, 23);

    resistanceNumber.setEditable(false);
    resistanceNumber.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    resistanceNumber.setText("5.0");
    settingPanel.add(resistanceNumber);
    resistanceNumber.setBounds(130, 120, 40, 30);

    inductanceLabel.setText("Inductance");
    settingPanel.add(inductanceLabel);
    inductanceLabel.setBounds(70, 150, 70, 15);

    inductanceSlider.setMinimum(1);
    inductanceSlider.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            inductanceSliderStateChanged(evt);
        }
    });
    settingPanel.add(inductanceSlider);
    inductanceSlider.setBounds(10, 170, 120, 23);

    inductanceNumber.setEditable(false);
    inductanceNumber.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    inductanceNumber.setText("50");
    settingPanel.add(inductanceNumber);
    inductanceNumber.setBounds(130, 170, 40, 30);

    capacitanceSlider.setMaximum(1000);
    capacitanceSlider.setMinimum(1);
    capacitanceSlider.setValue(500);
    capacitanceSlider.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            capacitanceSliderStateChanged(evt);
        }
    });
    settingPanel.add(capacitanceSlider);
    capacitanceSlider.setBounds(10, 220, 120, 23);

    capacitanceLabel.setText("Capacitance");
    settingPanel.add(capacitanceLabel);
    capacitanceLabel.setBounds(70, 200, 80, 15);

    capacitanceNumber.setEditable(false);
    capacitanceNumber.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    capacitanceNumber.setText("500");
    settingPanel.add(capacitanceNumber);
    capacitanceNumber.setBounds(130, 220, 40, 30);

    voltageLabel.setFont(new java.awt.Font("", 1, 12)); // NOI18N
    voltageLabel.setText("Voltage");
    settingPanel.add(voltageLabel);
    voltageLabel.setBounds(80, 290, 50, 15);

    voltageNumber.setEditable(false);
    voltageNumber.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    voltageNumber.setText("5");
    settingPanel.add(voltageNumber);
    voltageNumber.setBounds(130, 320, 40, 30);

    voltageSlider.setMaximum(10);
    voltageSlider.setMinimum(1);
    voltageSlider.setPaintTicks(true);
    voltageSlider.setValue(5);
    voltageSlider.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            voltageSliderStateChanged(evt);
        }
    });
    settingPanel.add(voltageSlider);
    voltageSlider.setBounds(10, 320, 120, 30);

    frequencyLabel.setFont(new java.awt.Font("", 1, 12)); // NOI18N
    frequencyLabel.setText("Frequency");
    settingPanel.add(frequencyLabel);
    frequencyLabel.setBounds(70, 360, 70, 15);

    frequencyNumber.setEditable(false);
    frequencyNumber.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    frequencyNumber.setText("50");
    settingPanel.add(frequencyNumber);
    frequencyNumber.setBounds(130, 390, 40, 30);

    frequencySlider.setMinimum(10);
    frequencySlider.setPaintTicks(true);
    frequencySlider.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            frequencySliderStateChanged(evt);
        }
    });
    settingPanel.add(frequencySlider);
    frequencySlider.setBounds(10, 390, 120, 31);

    resistanceUnit.setText("");
    settingPanel.add(resistanceUnit);
    resistanceUnit.setBounds(170, 120, 20, 20);

    inductanceUnit.setText("mH");
    settingPanel.add(inductanceUnit);
    inductanceUnit.setBounds(170, 170, 20, 20);

    capacitanceUnit.setText("F");
    settingPanel.add(capacitanceUnit);
    capacitanceUnit.setBounds(170, 220, 20, 20);

    voltageUnit.setText("V");
    settingPanel.add(voltageUnit);
    voltageUnit.setBounds(170, 320, 20, 20);

    frequencyUnit.setText("Hz");
    settingPanel.add(frequencyUnit);
    frequencyUnit.setBounds(170, 390, 20, 20);

    backgroundPanel.add(settingPanel);
    settingPanel.setBounds(400, 0, 200, 500);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(backgroundPanel,
                    javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(backgroundPanel,
                    javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE));

    pack();
}

From source file:org.nekorp.workflow.desktop.view.EventoSistemaView.java

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

    nombreEvento = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJLabel();
    fechaCreacionLabel = new org.nekorp.workflow.desktop.view.binding.FormatedJLabel(dateConverter);

    setBackground(new java.awt.Color(255, 255, 255));
    setMaximumSize(new java.awt.Dimension(32767, 25));

    nombreEvento.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
    nombreEvento.setText("  ");

    fechaCreacionLabel.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    fechaCreacionLabel.setText("12/12/2012");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addContainerGap()
                            .addComponent(nombreEvento, javax.swing.GroupLayout.PREFERRED_SIZE, 150,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(fechaCreacionLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 100,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(128, Short.MAX_VALUE)));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(nombreEvento).addComponent(fechaCreacionLabel))
                            .addGap(0, 0, 0)));
}

From source file:com.igormaznitsa.zxpoly.ui.AboutDialog.java

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

    buttonOk = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    editorPane = new javax.swing.JEditorPane();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("About");

    buttonOk.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/igormaznitsa/zxpoly/icons/ok.png"))); // NOI18N
    buttonOk.setText("Ok");
    buttonOk.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonOkActionPerformed(evt);
        }
    });

    editorPane.setEditable(false);
    jScrollPane1.setViewportView(editorPane);

    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.TRAILING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 588,
                                    Short.MAX_VALUE)
                            .addComponent(buttonOk, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 421, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(buttonOk)
                    .addContainerGap()));

    pack();
}

From source file:feelings.analyser.views.MainView.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  .  jav  a  2s .  co  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();
    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    lstPosts = new javax.swing.JList();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jPanel1.setLayout(null);

    jPanel2.setLayout(new javax.swing.OverlayLayout(jPanel2));

    jLabel1.setText("Analisador de sentimientos");

    lstPosts.setModel(new javax.swing.AbstractListModel() {
        String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };

        public int getSize() {
            return strings.length;
        }

        public Object getElementAt(int i) {
            return strings[i];
        }
    });
    jScrollPane1.setViewportView(lstPosts);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1).addComponent(jScrollPane1,
                                    javax.swing.GroupLayout.PREFERRED_SIZE, 400,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(10, 10, 10).addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 520,
                            javax.swing.GroupLayout.PREFERRED_SIZE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(10, 10, 10)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 500,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup().addGap(11, 11, 11).addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 285,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(201, 201, 201)));

    pack();
}

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

    fileChooser = new javax.swing.JFileChooser();
    jFrame1 = new javax.swing.JFrame();
    jFrame2 = new javax.swing.JFrame();
    jScrollPane1 = new javax.swing.JScrollPane();
    textarea = new javax.swing.JTextArea();
    progressBar = new javax.swing.JProgressBar();
    startButton = new javax.swing.JButton();
    jLabel2 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jButton1 = new javax.swing.JButton();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTextPane2 = new javax.swing.JTextPane();
    jLabel1 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    jLabel8 = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    jLabel10 = new javax.swing.JLabel();
    jLabel11 = new javax.swing.JLabel();
    jMenuBar = new javax.swing.JMenuBar();
    open = new javax.swing.JMenu();
    NewFile = new javax.swing.JMenuItem();
    Open = new javax.swing.JMenuItem();
    Clear = new javax.swing.JMenuItem();
    exit = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    jMenuItem1 = new javax.swing.JMenuItem();

    fileChooser.setDialogTitle("This is my open dialog");
    fileChooser.setFileFilter(new MyCustomFilter());

    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));

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

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

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("NO4");

    startButton.setIcon(new javax.swing.ImageIcon("C:\\resources\\unnamed.png")); // NOI18N
    startButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            startButtonActionPerformed(evt);
        }
    });

    jLabel2.setIcon(new javax.swing.ImageIcon("C:\\resources\\header.jpg")); // NOI18N

    jLabel4.setText("Input File");

    jButton1.setIcon(new javax.swing.ImageIcon("C:\\resources\\NextButton.jpg")); // NOI18N
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    jScrollPane2.setViewportView(jTextPane2);

    jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel1.setText("Before uploading file please make sure:");

    jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel3.setText("- The code is built through structured programming.");

    jLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel5.setText("- The code is programmed in C/C++.");

    jLabel6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel6.setText("- The code is free of syntax errors.");

    jLabel8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel8.setForeground(new java.awt.Color(255, 51, 51));
    jLabel8.setText("Warning : Please make sure you have a backup available.");

    jLabel9.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel9.setText("Steps to run the program:");

    jLabel10.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel10.setText("1. Make a new project (File -> New Project) and specify path for output files.");

    jLabel11.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel11.setText("2. Select Input File (File -> Open File)");

    jMenuBar.setForeground(new java.awt.Color(51, 51, 255));

    open.setBackground(new java.awt.Color(51, 102, 255));
    open.setText("File");
    open.setMaximumSize(new java.awt.Dimension(30, 32767));
    open.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            openActionPerformed(evt);
        }
    });

    NewFile.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N,
            java.awt.event.InputEvent.CTRL_MASK));
    NewFile.setIcon(new javax.swing.ImageIcon("C:\\resources\\Actions-project-open-icon.png")); // NOI18N
    NewFile.setText("New Project");
    NewFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            NewFileActionPerformed(evt);
        }
    });
    open.add(NewFile);

    Open.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F,
            java.awt.event.InputEvent.CTRL_MASK));
    Open.setIcon(new javax.swing.ImageIcon("C:\\resources\\images.jpg")); // NOI18N
    Open.setText("Open File");
    Open.setMaximumSize(new java.awt.Dimension(40000, 32767));
    Open.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            OpenActionPerformed(evt);
        }
    });
    open.add(Open);

    Clear.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C,
            java.awt.event.InputEvent.CTRL_MASK));
    Clear.setIcon(new javax.swing.ImageIcon("C:\\resources\\Broom_icon.png")); // NOI18N
    Clear.setText("Clear");
    Clear.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            ClearActionPerformed(evt);
        }
    });
    open.add(Clear);

    exit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E,
            java.awt.event.InputEvent.CTRL_MASK));
    exit.setIcon(new javax.swing.ImageIcon("C:\\resources\\Delete.png")); // NOI18N
    exit.setText("Exit");
    exit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitActionPerformed(evt);
        }
    });
    open.add(exit);

    jMenuBar.add(open);

    jMenu2.setText("Help");

    jMenuItem1.setIcon(new javax.swing.ImageIcon("C:\\resources\\Actions-help-about-icon.png")); // NOI18N
    jMenuItem1.setText("About");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    jMenu2.add(jMenuItem1);

    jMenuBar.add(jMenu2);

    setJMenuBar(jMenuBar);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE,
                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jScrollPane2)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(startButton, javax.swing.GroupLayout.PREFERRED_SIZE, 41,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup().addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addGap(10, 10, 10).addComponent(jLabel4))
                            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 625,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(layout.createSequentialGroup().addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel1).addComponent(jLabel9)
                                            .addGroup(layout.createSequentialGroup().addGap(10, 10, 10)
                                                    .addGroup(layout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addComponent(jLabel5).addComponent(jLabel3)
                                                            .addComponent(jLabel6).addComponent(jLabel10)
                                                            .addComponent(jLabel11))))
                                            .addGap(35, 35, 35).addComponent(jLabel7))
                                    .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 116,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap())
            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel8)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 59,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                    layout.createSequentialGroup().addGap(177, 177, 177).addComponent(jLabel7))
                            .addGroup(layout.createSequentialGroup().addGap(18, 18, 18).addComponent(jLabel1)
                                    .addGap(33, 33, 33).addComponent(jLabel3)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel5)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel6).addGap(18, 18, 18).addComponent(jLabel8)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel9)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel10)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel11)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
                    .addComponent(jLabel4).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(startButton))
                    .addGap(52, 52, 52)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 36,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));

    pack();
}

From source file:maltcms.ui.nb.pipelineRunner.ui.PipelineRunnerTopComponent.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  av a2  s  . co  m*/
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jToolBar1 = new javax.swing.JToolBar();
    runButton = new javax.swing.JButton();
    stopButton = new javax.swing.JButton();
    jSeparator1 = new javax.swing.JToolBar.Separator();
    removePipeline = new javax.swing.JButton();
    contentPanel = new javax.swing.JPanel();
    jSplitPane1 = new javax.swing.JSplitPane();
    jScrollPane1 = new javax.swing.JScrollPane();
    processList = new javax.swing.JList();
    jScrollPane2 = new javax.swing.JScrollPane();
    runningProcessList = new javax.swing.JList();

    jToolBar1.setRollover(true);

    runButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/maltcms/ui/nb/pipelineRunner/media-playback-start.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(runButton, org.openide.util.NbBundle
            .getMessage(PipelineRunnerTopComponent.class, "PipelineRunnerTopComponent.runButton.text")); // NOI18N
    runButton.setToolTipText(org.openide.util.NbBundle.getMessage(PipelineRunnerTopComponent.class,
            "PipelineRunnerTopComponent.runButton.toolTipText")); // NOI18N
    runButton.setFocusable(false);
    runButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    runButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    runButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            runButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(runButton);

    stopButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/maltcms/ui/nb/pipelineRunner/media-playback-stop.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(stopButton, org.openide.util.NbBundle
            .getMessage(PipelineRunnerTopComponent.class, "PipelineRunnerTopComponent.stopButton.text")); // NOI18N
    stopButton.setToolTipText(org.openide.util.NbBundle.getMessage(PipelineRunnerTopComponent.class,
            "PipelineRunnerTopComponent.stopButton.toolTipText")); // NOI18N
    stopButton.setFocusable(false);
    stopButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    stopButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    stopButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stopButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(stopButton);
    jToolBar1.add(jSeparator1);

    removePipeline.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/maltcms/ui/nb/pipelineRunner/remove.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(removePipeline, org.openide.util.NbBundle
            .getMessage(PipelineRunnerTopComponent.class, "PipelineRunnerTopComponent.removePipeline.text")); // NOI18N
    removePipeline.setFocusable(false);
    removePipeline.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    removePipeline.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    removePipeline.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            removePipelineActionPerformed(evt);
        }
    });
    jToolBar1.add(removePipeline);

    jSplitPane1.setDividerLocation(150);
    jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);

    processList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    jScrollPane1.setViewportView(processList);

    jSplitPane1.setLeftComponent(jScrollPane1);

    jScrollPane2.setViewportView(runningProcessList);

    jSplitPane1.setRightComponent(jScrollPane2);

    javax.swing.GroupLayout contentPanelLayout = new javax.swing.GroupLayout(contentPanel);
    contentPanel.setLayout(contentPanelLayout);
    contentPanelLayout.setHorizontalGroup(
            contentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 464, Short.MAX_VALUE));
    contentPanelLayout
            .setVerticalGroup(contentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 284, Short.MAX_VALUE));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 464, Short.MAX_VALUE)
            .addComponent(contentPanel, 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()
                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(contentPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
}

From source file:com.mirth.connect.client.ui.ChangePasswordDialog.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. jav a2  s.  co  m
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    channelOverview = new javax.swing.JPanel();
    mirthHeadingPanel1 = new com.mirth.connect.client.ui.MirthHeadingPanel();
    mirthHeadingLabel = new javax.swing.JLabel();
    passwordLabel = new javax.swing.JLabel();
    password = new javax.swing.JPasswordField();
    confirmPasswordLabel = new javax.swing.JLabel();
    confirmPassword = new javax.swing.JPasswordField();
    jSeparator1 = new javax.swing.JSeparator();
    cancelButton = new javax.swing.JButton();
    finishButton = new javax.swing.JButton();
    passwordPane = new javax.swing.JScrollPane();
    passwordTextArea = new javax.swing.JTextArea();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Change Password");
    setResizable(false);

    channelOverview.setBackground(new java.awt.Color(255, 255, 255));
    channelOverview.setName(""); // NOI18N

    mirthHeadingLabel.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
    mirthHeadingLabel.setForeground(new java.awt.Color(255, 255, 255));
    mirthHeadingLabel.setText("Change Password");

    javax.swing.GroupLayout mirthHeadingPanel1Layout = new javax.swing.GroupLayout(mirthHeadingPanel1);
    mirthHeadingPanel1.setLayout(mirthHeadingPanel1Layout);
    mirthHeadingPanel1Layout.setHorizontalGroup(mirthHeadingPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mirthHeadingPanel1Layout.createSequentialGroup().addContainerGap()
                    .addComponent(mirthHeadingLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 353, Short.MAX_VALUE)
                    .addContainerGap()));
    mirthHeadingPanel1Layout.setVerticalGroup(mirthHeadingPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mirthHeadingPanel1Layout.createSequentialGroup().addContainerGap()
                    .addComponent(mirthHeadingLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 29, Short.MAX_VALUE)
                    .addContainerGap()));

    mirthHeadingLabel.getAccessibleContext().setAccessibleName("Change Password");

    passwordLabel.setText("New Password:");

    password.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            passwordKeyReleased(evt);
        }
    });

    confirmPasswordLabel.setText("Confirm New Password:");

    confirmPassword.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            confirmPasswordKeyReleased(evt);
        }
    });

    cancelButton.setText("Cancel");
    cancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelButtonActionPerformed(evt);
        }
    });

    finishButton.setText("Finish");
    finishButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            finishButtonActionPerformed(evt);
        }
    });

    passwordPane.setBorder(null);
    passwordPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    passwordPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);

    passwordTextArea.setColumns(20);
    passwordTextArea.setEditable(false);
    passwordTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
    passwordTextArea.setLineWrap(true);
    passwordTextArea.setRows(2);
    passwordTextArea.setText(
            "Your password has expired. You are required to change your password in the next 14 days and 23 hours.");
    passwordTextArea.setWrapStyleWord(true);
    passwordTextArea.setEnabled(false);
    passwordPane.setViewportView(passwordTextArea);

    javax.swing.GroupLayout channelOverviewLayout = new javax.swing.GroupLayout(channelOverview);
    channelOverview.setLayout(channelOverviewLayout);
    channelOverviewLayout.setHorizontalGroup(
            channelOverviewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            channelOverviewLayout.createSequentialGroup().addContainerGap(234, Short.MAX_VALUE)
                                    .addComponent(cancelButton)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(finishButton).addGap(9, 9, 9))
                    .addComponent(mirthHeadingPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 373,
                            Short.MAX_VALUE)
                    .addGroup(
                            javax.swing.GroupLayout.Alignment.TRAILING,
                            channelOverviewLayout
                                    .createSequentialGroup().addContainerGap()
                                    .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 353,
                                            Short.MAX_VALUE)
                                    .addContainerGap())
                    .addGroup(channelOverviewLayout.createSequentialGroup().addContainerGap()
                            .addGroup(channelOverviewLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(passwordLabel, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(confirmPasswordLabel,
                                            javax.swing.GroupLayout.Alignment.TRAILING))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(channelOverviewLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(confirmPassword, javax.swing.GroupLayout.DEFAULT_SIZE, 200,
                                            Short.MAX_VALUE)
                                    .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, 200,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addContainerGap(45, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            channelOverviewLayout.createSequentialGroup().addContainerGap(34, Short.MAX_VALUE)
                                    .addComponent(passwordPane, javax.swing.GroupLayout.PREFERRED_SIZE, 305,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(34, 34, 34)));
    channelOverviewLayout.setVerticalGroup(channelOverviewLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, channelOverviewLayout.createSequentialGroup()
                    .addComponent(mirthHeadingPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 51,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(channelOverviewLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(passwordLabel).addComponent(password,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(channelOverviewLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(confirmPasswordLabel).addComponent(confirmPassword,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(passwordPane, 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(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(channelOverviewLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(finishButton).addComponent(cancelButton))
                    .addContainerGap()));

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

    pack();
}