Example #1
0
  /**
   * 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.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jLabel8 = new javax.swing.JLabel();
    jAttr = new javax.swing.JComboBox();

    jLabel8.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLabel8.setText(AppLocal.getIntString("label.attribute")); // NOI18N

    jAttr.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N

    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(
                        jLabel8,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        110,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jAttr,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        220,
                        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.LEADING, false)
                            .addComponent(
                                jAttr, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)
                            .addComponent(
                                jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE))
                    .addContainerGap(22, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents
Example #2
0
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jPanel2 = new javax.swing.JPanel();
    jPanel6 = new javax.swing.JPanel();
    btnCustomer = new javax.swing.JButton();
    btnSave = new javax.swing.JButton();
    jSeparator1 = new javax.swing.JSeparator();
    btnPay = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    m_jKeys = new com.openbravo.editor.JEditorKeys();
    jPanel5 = new javax.swing.JPanel();
    editorcard = new com.openbravo.editor.JEditorString();
    jButton1 = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jLabel3 = new javax.swing.JLabel();
    jLabel12 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    txtCard = new javax.swing.JTextField();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    txtCurdebt = new javax.swing.JTextField();
    txtCurdate = new javax.swing.JTextField();
    jLabel6 = new javax.swing.JLabel();
    txtName = new javax.swing.JTextField();
    txtMaxdebt = new javax.swing.JTextField();
    txtNotes = new com.openbravo.editor.JEditorString();
    txtTaxId = new javax.swing.JTextField();
    jLabel7 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jList1 = new javax.swing.JList();
    jLabel4 = new javax.swing.JLabel();

    setLayout(new java.awt.BorderLayout());

    jPanel2.setLayout(new java.awt.BorderLayout());

    btnCustomer.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/kuser.png"))); // NOI18N
    btnCustomer.setFocusPainted(false);
    btnCustomer.setFocusable(false);
    btnCustomer.setMargin(new java.awt.Insets(8, 14, 8, 14));
    btnCustomer.setRequestFocusEnabled(false);
    btnCustomer.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCustomerActionPerformed(evt);
          }
        });
    jPanel6.add(btnCustomer);

    btnSave.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/filesave.png"))); // NOI18N
    btnSave.setFocusPainted(false);
    btnSave.setFocusable(false);
    btnSave.setMargin(new java.awt.Insets(8, 14, 8, 14));
    btnSave.setRequestFocusEnabled(false);
    btnSave.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveActionPerformed(evt);
          }
        });
    jPanel6.add(btnSave);
    jPanel6.add(jSeparator1);

    btnPay.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/greenled.png"))); // NOI18N
    btnPay.setText(AppLocal.getIntString("button.pay")); // NOI18N
    btnPay.setFocusPainted(false);
    btnPay.setFocusable(false);
    btnPay.setMargin(new java.awt.Insets(8, 14, 8, 14));
    btnPay.setRequestFocusEnabled(false);
    btnPay.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnPayActionPerformed(evt);
          }
        });
    jPanel6.add(btnPay);

    jPanel2.add(jPanel6, java.awt.BorderLayout.LINE_START);

    add(jPanel2, java.awt.BorderLayout.PAGE_START);

    jPanel3.setLayout(new java.awt.BorderLayout());

    jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.Y_AXIS));

    m_jKeys.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jKeysActionPerformed(evt);
          }
        });
    jPanel4.add(m_jKeys);

    jPanel5.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
    jPanel5.setLayout(new java.awt.GridBagLayout());
    jPanel5.add(editorcard, new java.awt.GridBagConstraints());

    jButton1.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/button_ok.png"))); // NOI18N
    jButton1.setFocusPainted(false);
    jButton1.setFocusable(false);
    jButton1.setMargin(new java.awt.Insets(8, 14, 8, 14));
    jButton1.setRequestFocusEnabled(false);
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    jPanel5.add(jButton1, gridBagConstraints);

    jPanel4.add(jPanel5);

    jPanel3.add(jPanel4, java.awt.BorderLayout.NORTH);

    add(jPanel3, java.awt.BorderLayout.LINE_END);

    jLabel3.setText(AppLocal.getIntString("label.name")); // NOI18N

    jLabel12.setText(AppLocal.getIntString("label.notes")); // NOI18N

    jLabel5.setText(AppLocal.getIntString("label.card")); // NOI18N

    txtCard.setEditable(false);
    txtCard.setFocusable(false);
    txtCard.setRequestFocusEnabled(false);

    jLabel1.setText(AppLocal.getIntString("label.maxdebt")); // NOI18N

    jLabel2.setText(AppLocal.getIntString("label.curdebt")); // NOI18N

    txtCurdebt.setEditable(false);
    txtCurdebt.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    txtCurdebt.setFocusable(false);
    txtCurdebt.setRequestFocusEnabled(false);

    txtCurdate.setEditable(false);
    txtCurdate.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    txtCurdate.setFocusable(false);
    txtCurdate.setRequestFocusEnabled(false);

    jLabel6.setText(AppLocal.getIntString("label.curdate")); // NOI18N

    txtName.setEditable(false);
    txtName.setFocusable(false);
    txtName.setRequestFocusEnabled(false);

    txtMaxdebt.setEditable(false);
    txtMaxdebt.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    txtMaxdebt.setFocusable(false);
    txtMaxdebt.setRequestFocusEnabled(false);

    txtTaxId.setEditable(false);
    txtTaxId.setFocusable(false);
    txtTaxId.setRequestFocusEnabled(false);

    jLabel7.setText(AppLocal.getIntString("label.taxid")); // NOI18N

    jScrollPane1.setViewportView(jList1);

    jLabel4.setText("Due Invoices");

    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(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel7,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        140,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        txtTaxId,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        240,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel3,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        140,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        txtName,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        240,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel5,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        140,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        txtCard,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        240,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel12,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        140,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        txtNotes,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        273,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        140,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        txtMaxdebt,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        130,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel2,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        140,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        txtCurdebt,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        130,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel6,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        140,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        txtCurdate,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        130,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel4,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        134,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(
                                        jScrollPane1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        233,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(93, 93, 93)));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel7,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                txtTaxId,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel3,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                txtName,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel5,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                txtCard,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jLabel12,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                txtNotes,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                80,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                txtMaxdebt,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                txtCurdebt,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel6,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                txtCurdate,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                25,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addGap(23, 23, 23)
                                    .addComponent(jLabel4))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        jScrollPane1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(53, Short.MAX_VALUE)));

    add(jPanel1, java.awt.BorderLayout.CENTER);
  } // </editor-fold>//GEN-END:initComponents