Example usage for javax.swing GroupLayout setHorizontalGroup

List of usage examples for javax.swing GroupLayout setHorizontalGroup

Introduction

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

Prototype

public void setHorizontalGroup(Group group) 

Source Link

Document

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

Usage

From source file:com.dvd.ui.Login.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 om*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed"
// desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    errorTag = new javax.swing.JLabel();
    jPanel1 = new javax.swing.JPanel();
    label1 = new java.awt.Label();
    jLabel1 = new javax.swing.JLabel();
    login = new javax.swing.JButton();
    picLabel = new javax.swing.JLabel();
    userIDTxt = new javax.swing.JTextField();
    errorTagLabel = new javax.swing.JLabel();

    errorTag.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
    errorTag.setForeground(new java.awt.Color(255, 0, 0));
    errorTag.setText("No result found");

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setBackground(new java.awt.Color(106, 161, 172));
    setResizable(false);

    jPanel1.setBackground(new java.awt.Color(23, 193, 111));
    jPanel1.setForeground(new java.awt.Color(74, 74, 74));

    label1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    label1.setFont(new java.awt.Font("Ubuntu Medium", 1, 36)); // NOI18N
    label1.setForeground(new java.awt.Color(254, 254, 254));
    label1.setText("DVD Shop User Login");

    jLabel1.setFont(new java.awt.Font("Ubuntu", 0, 16)); // NOI18N
    jLabel1.setForeground(new java.awt.Color(254, 254, 254));
    jLabel1.setText("Enter UserID");

    login.setText("Login");
    login.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            loginActionPerformed(evt);
        }
    });

    picLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/pic7.jpg"))); // NOI18N
    picLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));

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

    errorTagLabel.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
    errorTagLabel.setForeground(new java.awt.Color(133, 20, 20));
    errorTagLabel.setText("Authentication Failed");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                            javax.swing.GroupLayout.Alignment.TRAILING,
                            jPanel1Layout
                                    .createSequentialGroup()
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
                                            Short.MAX_VALUE)
                                    .addComponent(
                                            errorTagLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 275,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(184, 184, 184))
                    .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addGap(84, 84, 84)
                                    .addGroup(jPanel1Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createSequentialGroup().addGap(46, 46, 46)
                                                    .addComponent(
                                                            label1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                    .addComponent(jLabel1).addGap(20, 20, 20)
                                                    .addComponent(userIDTxt,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 208,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(18, 18, 18).addComponent(login,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 125,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(jPanel1Layout.createSequentialGroup().addGap(125, 125, 125)
                                    .addComponent(picLabel)))
                            .addContainerGap(97, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addComponent(label1, 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(jLabel1)
                            .addComponent(userIDTxt, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(login))
                    .addGap(18, 18, 18).addComponent(errorTagLabel).addGap(18, 18, 18).addComponent(picLabel,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 288, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(72, Short.MAX_VALUE)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    javax.swing.GroupLayout.PREFERRED_SIZE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addContainerGap(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)));

    pack();
}

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

    scanBtn = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    jFileList = new javax.swing.JList();
    scanBtn1 = new javax.swing.JButton();
    loadFileToServerBtn = new javax.swing.JButton();
    saveToJSONBtn = new javax.swing.JButton();
    jScrollPane2 = new javax.swing.JScrollPane();
    jDirectoriesList = new javax.swing.JList();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    scanBtn.setText("Add directory");
    scanBtn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            scanBtnActionPerformed(evt);
        }
    });

    jFileList.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(jFileList);

    scanBtn1.setText("Remove Directory");
    scanBtn1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            scanBtn1ActionPerformed(evt);
        }
    });

    loadFileToServerBtn.setText("Search");
    loadFileToServerBtn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            loadFileToServerBtnActionPerformed(evt);
        }
    });

    saveToJSONBtn.setText("  JSON");
    saveToJSONBtn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveToJSONBtnActionPerformed(evt);
        }
    });

    jDirectoriesList.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];
        }
    });
    jScrollPane2.setViewportView(jDirectoriesList);

    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()
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 118,
                                            Short.MAX_VALUE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                            jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 611,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup().addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(scanBtn, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(loadFileToServerBtn, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createSequentialGroup().addGap(43, 43, 43)
                                                    .addComponent(saveToJSONBtn))
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                    layout.createSequentialGroup().addGap(42, 42, 42)
                                                            .addComponent(scanBtn1)))
                                    .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 333,
                                            Short.MAX_VALUE)
                                    .addComponent(jScrollPane2))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(scanBtn).addComponent(scanBtn1))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(loadFileToServerBtn).addComponent(saveToJSONBtn))
                            .addContainerGap()));

    pack();
}

From source file:examples.gp.monalisa.gui.GeneticDrawingView.java

/** This method is called from within the constructor to
 * initialize the form./*from w ww . j  a v a 2 s  . c o  m*/
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    mainPanel = new javax.swing.JPanel();
    chooseImage = new javax.swing.JButton();
    startEvolution = new javax.swing.JToggleButton();
    targetImageLabel = new javax.swing.JLabel();
    saveCheckBox = new JCheckBox();
    saveCheckBox.setText("Save every fittest result to file");
    targetSaveDirLabel = new JLabel("Target directory:");
    try {
        targetSaveDirEdit = new JLabel(FileKit.getCurrentDir());
    } catch (IOException ex) {
        targetSaveDirEdit = new JLabel();
    }
    JFreeChart chart = ChartFactory.createXYLineChart("Fitness versus Generation", "Generation", "Fitness",
            new XYSeriesCollection(new XYSeries("")), org.jfree.chart.plot.PlotOrientation.VERTICAL, false,
            false, false);
    chartPanel = new ChartPanel(chart);
    menuBar = new javax.swing.JMenuBar();
    javax.swing.JMenu fileMenu = new javax.swing.JMenu();
    javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
    javax.swing.JMenu helpMenu = new javax.swing.JMenu();
    javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
    mainPanel.setName("mainPanel"); // NOI18N
    javax.swing.ActionMap actionMap = org.jdesktop.application.Application
            .getInstance(examples.gp.monalisa.gui.GeneticDrawingApp.class).getContext()
            .getActionMap(GeneticDrawingView.class, this);
    chooseImage.setAction(actionMap.get("chooseImage")); // NOI18N
    org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
            .getInstance(examples.gp.monalisa.gui.GeneticDrawingApp.class).getContext()
            .getResourceMap(GeneticDrawingView.class);
    chooseImage.setText(resourceMap.getString("chooseImage.text")); // NOI18N
    chooseImage.setName("chooseImage"); // NOI18N
    startEvolution.setAction(actionMap.get("startEvolution")); // NOI18N
    startEvolution.setText(resourceMap.getString("startEvolution.text")); // NOI18N
    startEvolution.setName("startEvolution"); // NOI18N
    targetImageLabel.setIcon(resourceMap.getIcon("targetImageLabel.icon")); // NOI18N
    targetImageLabel.setText(resourceMap.getString("targetImageLabel.text")); // NOI18N
    targetImageLabel.setName("targetImageLabel"); // NOI18N
    chartPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    chartPanel.setName("chartPanel"); // NOI18N
    org.jdesktop.layout.GroupLayout chartPanelLayout = new org.jdesktop.layout.GroupLayout(chartPanel);
    chartPanel.setLayout(chartPanelLayout);
    chartPanelLayout.setHorizontalGroup(chartPanelLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 399, Short.MAX_VALUE));
    chartPanelLayout.setVerticalGroup(chartPanelLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 234, Short.MAX_VALUE));
    org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(mainPanel);
    mainPanel.setLayout(mainPanelLayout);
    mainPanelLayout.setHorizontalGroup(mainPanelLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(mainPanelLayout.createSequentialGroup().add(mainPanelLayout
                    .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(mainPanelLayout.createSequentialGroup().add(47, 47, 47).add(chooseImage)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(startEvolution)
                            .add(38, 38, 38))
                    .add(mainPanelLayout.createSequentialGroup().add(47, 47, 47).add(saveCheckBox).add(140, 140,
                            140))
                    .add(mainPanelLayout.createSequentialGroup().add(47, 47, 47).add(targetSaveDirLabel)
                            .add(targetSaveDirEdit).add(47, 47, 47))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, mainPanelLayout.createSequentialGroup()
                            .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(targetImageLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200,
                                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(80, 80, 80)))
                    .add(chartPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    mainPanelLayout.setVerticalGroup(mainPanelLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, mainPanelLayout.createSequentialGroup()
                    .addContainerGap()
                    .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, chartPanel,
                                    org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                    org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(mainPanelLayout.createSequentialGroup().add(saveCheckBox)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(targetSaveDirLabel).add(targetSaveDirEdit)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(targetImageLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 202,
                                            Short.MAX_VALUE)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(mainPanelLayout
                                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                            .add(startEvolution).add(chooseImage))))
                    .addContainerGap()));
    chooseImage.getAccessibleContext()
            .setAccessibleName(resourceMap.getString("jButton1.AccessibleContext.accessibleName")); // NOI18N
    menuBar.setName("menuBar"); // NOI18N
    fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
    fileMenu.setName("fileMenu"); // NOI18N
    exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
    exitMenuItem.setName("exitMenuItem"); // NOI18N
    fileMenu.add(exitMenuItem);
    menuBar.add(fileMenu);
    helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
    helpMenu.setName("helpMenu"); // NOI18N
    aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
    aboutMenuItem.setName("aboutMenuItem"); // NOI18N
    helpMenu.add(aboutMenuItem);
    menuBar.add(helpMenu);
    setComponent(mainPanel);
    setMenuBar(menuBar);
}

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

    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jButton1 = new javax.swing.JButton();
    butCalcular = new javax.swing.JButton();
    txtX0 = new javax.swing.JTextField();
    txtTolerancia = new javax.swing.JTextField();
    txtIteraciones = new javax.swing.JTextField();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    panelGrafica = new javax.swing.JPanel();
    canvas1 = new java.awt.Canvas();
    panelTabla = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    txtFdx = new javax.swing.JTextField();
    txtFddx = new javax.swing.JTextField();
    jButton2 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jLabel2.setText("Xo:");

    jLabel3.setText("Tolerancia:");

    jLabel4.setText("Iteraciones:");

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

    butCalcular.setText("Calcular");
    butCalcular.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            butCalcularActionPerformed(evt);
        }
    });

    txtX0.setText("Xo");

    txtTolerancia.setText("Tolerancia");

    txtIteraciones.setText("Iteraciones");

    panelGrafica.add(canvas1);

    jTabbedPane1.addTab("Grafica", panelGrafica);

    panelTabla.setLayout(new java.awt.BorderLayout());
    jTabbedPane1.addTab("Tabla", panelTabla);

    jLabel5.setText("f'(x):");

    jLabel6.setText("f''(x):");

    txtFdx.setText("f'(x)");

    txtFddx.setText("f''(x)");

    jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/info.png"))); // NOI18N
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addComponent(jButton1).addGap(44, 44, 44)
                            .addComponent(butCalcular))
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel3).addComponent(jLabel2).addComponent(jLabel4)
                                    .addComponent(jLabel5).addComponent(jLabel6))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(
                                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(txtX0).addComponent(txtTolerancia)
                                            .addComponent(txtIteraciones).addComponent(txtFdx)
                                            .addComponent(txtFddx, javax.swing.GroupLayout.PREFERRED_SIZE, 83,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jButton2)).addGap(18, 18, 18)
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 391,
                            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().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 327,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup().addComponent(jButton2)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel2).addComponent(txtX0,
                                            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(jLabel3).addComponent(txtTolerancia,
                                            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(jLabel4).addComponent(txtIteraciones,
                                            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(jLabel5).addComponent(txtFdx,
                                            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(jLabel6).addComponent(txtFddx,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(69, 69, 69)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jButton1).addComponent(butCalcular))))
                    .addContainerGap()));

    pack();
}

From source file:com.pusksesmas.form_statistik.statistik_keuangan_administrasi.java

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

    jPanel1 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    tabelData = new javax.swing.JTable();
    vpil = new javax.swing.JComboBox();
    jLabel1 = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    jPanel3 = new javax.swing.JPanel();
    jLabel9 = new javax.swing.JLabel();

    jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    tabelData
            .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" }));
    tabelData.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            tabelDataMouseClicked(evt);
        }
    });
    jScrollPane1.setViewportView(tabelData);

    vpil.setModel(new javax.swing.DefaultComboBoxModel(
            new String[] { "Pilih", "Grafik Batang", "Grafik Lingkaran " }));
    vpil.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            vpilItemStateChanged(evt);
        }
    });

    jLabel1.setText("Jenis Tampilan Bar");

    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).addComponent(jScrollPane1)
                    .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel1).addGap(18, 18, 18)
                            .addComponent(vpil, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(vpil, 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.DEFAULT_SIZE, 45, Short.MAX_VALUE)
                    .addContainerGap()));

    jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
    jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel7.setText("STATISTIK KEUANGAN ADMINISTRASI");
    jLabel7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    jPanel3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
    jPanel3.setOpaque(false);

    jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/header (Mobile).png"))); // NOI18N
    jPanel3.add(jLabel9);

    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()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 952, Short.MAX_VALUE))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel7)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
}

From source file:ca.uviccscu.lp.persistence.ChooseFolderDialog.java

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

    jFileChooser2 = new javax.swing.JFileChooser();
    jPanel1 = new javax.swing.JPanel();
    jLabel3 = new javax.swing.JLabel();
    jButton2 = new javax.swing.JButton();
    jTextField3 = new javax.swing.JTextField();
    jButton3 = new javax.swing.JButton();
    jButton4 = new javax.swing.JButton();

    jFileChooser2.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);

    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    setTitle("Set working folder");
    setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);
    setResizable(false);

    jPanel1.setBackground(new java.awt.Color(51, 51, 51));

    jLabel3.setForeground(new java.awt.Color(255, 255, 255));
    jLabel3.setText("Working folder:");

    jButton2.setBackground(new java.awt.Color(51, 51, 51));
    jButton2.setText("...");
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });

    jTextField3.setBackground(new java.awt.Color(51, 51, 51));
    jTextField3.setToolTipText("Enter directory for storing all temp files");

    jButton3.setBackground(new java.awt.Color(51, 51, 51));
    jButton3.setText("Cancel");
    jButton3.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton3ActionPerformed(evt);
        }
    });

    jButton4.setBackground(new java.awt.Color(51, 51, 51));
    jButton4.setText("OK");
    jButton4.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton4ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                    jPanel1Layout.createSequentialGroup().addComponent(jLabel3)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    351, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jButton4)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jButton3)))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3).addComponent(jButton2))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap()));

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

    pack();
}

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

    jPanel1 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    tabelData = new javax.swing.JTable();
    vpil = new javax.swing.JComboBox();
    jLabel1 = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    jPanel3 = new javax.swing.JPanel();
    jLabel9 = new javax.swing.JLabel();

    jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    tabelData
            .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" }));
    tabelData.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            tabelDataMouseClicked(evt);
        }
    });
    jScrollPane1.setViewportView(tabelData);

    vpil.setModel(new javax.swing.DefaultComboBoxModel(
            new String[] { "Pilih", "Grafik Batang", "Grafik Lingkaran " }));
    vpil.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            vpilItemStateChanged(evt);
        }
    });

    jLabel1.setText("Jenis Tampilan Grafik");

    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).addComponent(jScrollPane1)
                    .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel1).addGap(18, 18, 18)
                            .addComponent(vpil, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(vpil, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(19, 19, 19)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)
                    .addContainerGap()));

    jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
    jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel7.setText("STATISTIK PENERIMAAN OBAT");
    jLabel7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    jPanel3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
    jPanel3.setOpaque(false);

    jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/header (Mobile).png"))); // NOI18N
    jPanel3.add(jLabel9);

    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()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 952, Short.MAX_VALUE))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel7)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
}

From source file:de.hsos.ecs.richwps.wpsmonitor.boundary.gui.controls.datasource.WpsDialog.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 a  2  s  . c  o  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    JPanel jPanel1 = new JPanel();
    closeButton = new JButton();
    addToMonitorButton = new JButton();
    treeScrollPane = new JScrollPane();
    wpsTree = new JTree();
    JLabel jLabel1 = new JLabel();

    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("List of WPS-Servers- and Processes");
    setIconImage(new ImageIcon(getClass().getResource("/icons/database.png")).getImage());
    setMinimumSize(null);
    setName("wpsDialog"); // NOI18N
    setResizable(false);

    jPanel1.setBorder(BorderFactory.createTitledBorder(""));

    closeButton.setIcon(new ImageIcon(getClass().getResource("/icons/apply.png"))); // NOI18N
    closeButton.setText("Close");
    closeButton.setName("closeButton"); // NOI18N
    closeButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            closeButtonActionPerformed(evt);
        }
    });

    addToMonitorButton.setIcon(new ImageIcon(getClass().getResource("/icons/add.png"))); // NOI18N
    addToMonitorButton.setText("Add WPS with Processes");
    addToMonitorButton.setName("addToMonitorButton"); // NOI18N
    addToMonitorButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            addToMonitorButtonActionPerformed(evt);
        }
    });

    DefaultMutableTreeNode treeNode1 = new DefaultMutableTreeNode("root");
    wpsTree.setModel(new DefaultTreeModel(treeNode1));
    wpsTree.setName("wpsTree"); // NOI18N
    treeScrollPane.setViewportView(wpsTree);

    jLabel1.setText(
            "<html><body>Here is a list of all registered data-sources. You can pick up processes and WPS and add your choice to the monitor through the \"Add WPS with Processes\"-Button. If you select only a WPS, all processes of this WPS will also  be added. The processes will  be saved, but they have no Jobs or a testrequest.</body></html>");

    GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
                            .addComponent(addToMonitorButton)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(closeButton))
                    .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(treeScrollPane, GroupLayout.PREFERRED_SIZE, 630,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel1Layout
            .setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                            .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(treeScrollPane, GroupLayout.DEFAULT_SIZE, 382, Short.MAX_VALUE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(addToMonitorButton).addComponent(closeButton))
                            .addContainerGap()));

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    pack();
}

From source file:loldmg.GUI.MainFrame.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 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();
    jLabel1 = new javax.swing.JLabel();
    championComboBox = new javax.swing.JComboBox();
    targetComboBox = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();
    DPSButton = new javax.swing.JButton();
    ShowTargetHP = new javax.swing.JCheckBox();
    GraphPanel = new javax.swing.JPanel();

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

    jPanel1.setBackground(new java.awt.Color(102, 102, 102));

    jLabel1.setText("Champion");

    championComboBox.setModel(new ChampionBoxModel());
    championComboBox.setRenderer(new ChampionListRenderer());

    targetComboBox.setModel(new ChampionBoxModel());
    targetComboBox.setRenderer(new ChampionListRenderer());

    jLabel2.setText("Target");

    DPSButton.setText("DPS");

    ShowTargetHP.setText("Show Target HP");

    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.LEADING)
                                            .addComponent(jLabel2).addComponent(jLabel1))
                                    .addGap(50, 50, 50)
                                    .addGroup(jPanel1Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(championComboBox, 0,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(targetComboBox, 0, 773, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            jPanel1Layout.createSequentialGroup().addComponent(ShowTargetHP)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(DPSButton)))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(championComboBox,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(targetComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(DPSButton).addComponent(ShowTargetHP))
                    .addContainerGap()));

    javax.swing.GroupLayout GraphPanelLayout = new javax.swing.GroupLayout(GraphPanel);
    GraphPanel.setLayout(GraphPanelLayout);
    GraphPanelLayout.setHorizontalGroup(GraphPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    GraphPanelLayout.setVerticalGroup(GraphPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 455, Short.MAX_VALUE));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(GraphPanel,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(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)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(GraphPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    pack();
}

From source file:UserInterface.SupplierRole.ProductSalesReviewJPanel.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 2s.  c o  m*/
 */
@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();
    salesTable = new javax.swing.JTable();
    jSeparator1 = new javax.swing.JSeparator();
    jPanel1 = new javax.swing.JPanel();
    showTopProductButton = new javax.swing.JButton();
    jLabel2 = new javax.swing.JLabel();
    totalSaleTextField = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jLabel3 = new javax.swing.JLabel();
    maximumSoldTextField = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    maximumSaleValueTextField = new javax.swing.JTextField();

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

    jLabel1.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
    jLabel1.setText("Sales Review & Product Performance");

    salesTable.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[] { "Product Name", "Quantity Sold", "Quantity per Price", "Sale Value" }) {
        boolean[] canEdit = new boolean[] { false, false, true, true };

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

    jPanel1.setBackground(new java.awt.Color(204, 204, 255));
    jPanel1.setForeground(new java.awt.Color(102, 102, 255));
    jPanel1.setLayout(new java.awt.BorderLayout());

    showTopProductButton.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
    showTopProductButton.setText("Show Top Selling Product");
    showTopProductButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            showTopProductButtonActionPerformed(evt);
        }
    });

    jLabel2.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
    jLabel2.setText("Total Sale :");

    totalSaleTextField.setEditable(false);

    jButton1.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
    jButton1.setText("<< Back ");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    jLabel3.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
    jLabel3.setText("Maximum Sold Product");

    maximumSoldTextField.setEditable(false);

    jLabel4.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
    jLabel4.setText("Maximum Sale Value Product");

    maximumSaleValueTextField.setEditable(false);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(layout.createSequentialGroup().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addGap(266, 266, 266).addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup().addGap(55, 55, 55).addComponent(jPanel1,
                            javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jButton1)
                            .addGap(309, 309, 309).addComponent(jLabel4).addGap(33, 33, 33)
                            .addComponent(maximumSaleValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    118, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup().addGap(85, 85, 85).addComponent(jScrollPane1,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 638,
                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(showTopProductButton)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 56, Short.MAX_VALUE)
                    .addComponent(jLabel3).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(maximumSoldTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 122,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(50, 50, 50)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 76,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(totalSaleTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 132,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(24, 24, 24)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 103,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(20, 20, 20)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(showTopProductButton).addComponent(jLabel2)
                            .addComponent(totalSaleTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)
                            .addComponent(maximumSoldTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(31, 31, 31)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 347, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jButton1)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel4).addComponent(maximumSaleValueTextField,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(19, 19, 19)));
}