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

    clientDiscountGroup = new javax.swing.ButtonGroup();
    jLayeredPane1 = new javax.swing.JLayeredPane();
    jPanel1 = new javax.swing.JPanel();
    lblID = new javax.swing.JLabel();
    ID = new javax.swing.JLabel();
    lblNama = new javax.swing.JLabel();
    Nama = new javax.swing.JTextField();
    okButton = new javax.swing.JButton();
    CancelButton = new javax.swing.JButton();
    applyButton = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setResizable(false);
    addWindowListener(
        new java.awt.event.WindowAdapter() {
          public void windowClosing(java.awt.event.WindowEvent evt) {
            closeDialog(evt);
          }
        });

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

    jPanel1.setBackground(new java.awt.Color(255, 255, 255));
    jPanel1.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            javax.swing.BorderFactory.createEtchedBorder(),
            "Stock Type Data",
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION,
            new java.awt.Font("Arial", 0, 10))); // NOI18N
    jPanel1.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N

    lblID.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N
    lblID.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    lblID.setText("ID");

    ID.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N
    ID.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    ID.setName("id"); // NOI18N

    lblNama.setText("Name");

    Nama.setName("nama"); // NOI18N

    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel1Layout
                    .createSequentialGroup()
                    .add(
                        jPanel1Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .add(4, 4, 4)
                                    .add(
                                        lblID,
                                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                        50,
                                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(lblNama))
                    .add(16, 16, 16)
                    .add(
                        jPanel1Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                ID,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                50,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(
                                Nama,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                203,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(225, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel1Layout
                    .createSequentialGroup()
                    .add(2, 2, 2)
                    .add(
                        jPanel1Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                ID,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                20,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(
                                lblID,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                10,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                    .add(
                        jPanel1Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(lblNama)
                            .add(
                                Nama,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(36, Short.MAX_VALUE)));

    jPanel1.setBounds(0, 0, 510, 110);
    jLayeredPane1.add(jPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

    okButton.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N
    okButton.setText("Ok");
    okButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            okButtonActionPerformed(evt);
          }
        });
    okButton.setBounds(530, 10, 80, 20);
    jLayeredPane1.add(okButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

    CancelButton.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N
    CancelButton.setText("Cancel");
    CancelButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            CloseButtonActionPerformed(evt);
          }
        });
    CancelButton.setBounds(530, 40, 80, 20);
    jLayeredPane1.add(CancelButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

    applyButton.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N
    applyButton.setText("Apply"); // NOI18N
    applyButton.setName("applyButton"); // NOI18N
    applyButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            applyButtonActionPerformed(evt);
          }
        });
    applyButton.setBounds(530, 70, 80, 20);
    jLayeredPane1.add(applyButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jLayeredPane1,
                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                620,
                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                layout
                    .createSequentialGroup()
                    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(
                        jLayeredPane1,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        114,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
  } // </editor-fold>//GEN-END:initComponents
Ejemplo n.º 2
0
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jLayeredPane1 = new javax.swing.JLayeredPane();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    fieldNameLabel = new javax.swing.JLabel();
    widthTextField = new javax.swing.JTextField();
    OKButton = new javax.swing.JButton();
    CancelButton = new javax.swing.JButton();

    setResizable(false);
    addWindowListener(
        new java.awt.event.WindowAdapter() {
          public void windowClosing(java.awt.event.WindowEvent evt) {
            closeDialog(evt);
          }
        });

    jPanel1.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            null,
            "Set Column Width",
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION,
            new java.awt.Font("Dialog", 0, 10))); // NOI18N

    jLabel1.setFont(new java.awt.Font("Dialog", 0, 10));
    jLabel1.setText("Width");

    jLabel2.setFont(new java.awt.Font("Dialog", 0, 10));
    jLabel2.setText("Column");

    fieldNameLabel.setFont(new java.awt.Font("Dialog", 0, 10));
    fieldNameLabel.setText("jLabel3");

    widthTextField.setFont(new java.awt.Font("SansSerif", 0, 10));
    widthTextField.setText("jTextField1");

    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel1Layout
                    .createSequentialGroup()
                    .add(9, 9, 9)
                    .add(
                        jLabel2,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        70,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(45, 45, 45)
                    .add(
                        jLabel1,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        70,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
            .add(
                jPanel1Layout
                    .createSequentialGroup()
                    .add(9, 9, 9)
                    .add(
                        fieldNameLabel,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        80,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(35, 35, 35)
                    .add(
                        widthTextField,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        90,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel1Layout
                    .createSequentialGroup()
                    .add(5, 5, 5)
                    .add(
                        jPanel1Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                jLabel2,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                20,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(
                                jLabel1,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                20,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(5, 5, 5)
                    .add(
                        jPanel1Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                fieldNameLabel,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                20,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(
                                widthTextField,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))));

    jPanel1.setBounds(5, 5, 245, 93);
    jLayeredPane1.add(jPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

    OKButton.setFont(new java.awt.Font("Dialog", 0, 10));
    OKButton.setText("Ok");
    OKButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            OKButtonActionPerformed(evt);
          }
        });
    OKButton.setBounds(90, 100, 80, 25);
    jLayeredPane1.add(OKButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

    CancelButton.setFont(new java.awt.Font("Dialog", 0, 10));
    CancelButton.setText("Cancel");
    CancelButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            CancelButtonActionPerformed(evt);
          }
        });
    CancelButton.setBounds(170, 100, 80, 25);
    jLayeredPane1.add(CancelButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jLayeredPane1,
                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                340,
                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jLayeredPane1,
                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                160,
                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
  } // </editor-fold>//GEN-END:initComponents