Package controleEstoque.formularios

Source Code of controleEstoque.formularios.FrmProdutosPendentes

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

/*
* FrmProdutosPendentes.java
*
* Created on 31/05/2012, 23:40:22
*/
package controleEstoque.formularios;

import controleEstoque.tabelas.Tabela;
import javax.swing.table.DefaultTableModel;

/**
*
* @author Administrador
*/
public class FrmProdutosPendentes extends javax.swing.JFrame {

    /** Creates new form FrmProdutosPendentes */
    public FrmProdutosPendentes() {
        initComponents();
        this.setLocationRelativeTo(null);
        this.setResizable(false);
        this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }

    /** 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() {

        jTextField1 = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        btnMarcar = new javax.swing.JButton();
        btnDesmarcar = new javax.swing.JButton();
        btnAutorizarCompra = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblPendentes = new javax.swing.JTable();
        btnCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setBackground(new java.awt.Color(255, 255, 255));
        setMaximumSize(null);
        setMinimumSize(new java.awt.Dimension(653, 379));
        setName("");
        setPreferredSize(null);
        getContentPane().setLayout(null);

        jTextField1.setText("Pesquisar produto...");
        getContentPane().add(jTextField1);
        jTextField1.setBounds(50, 80, 144, 20);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel1.setText("Produtos Pendentes");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(250, 20, 182, 22);

        btnMarcar.setText("Marcar Todos");
        getContentPane().add(btnMarcar);
        btnMarcar.setBounds(40, 270, 150, 20);

        btnDesmarcar.setText("Desmarcar Todos");
        getContentPane().add(btnDesmarcar);
        btnDesmarcar.setBounds(40, 300, 150, 20);

        btnAutorizarCompra.setText("Autorizar compra dos produtos selecionados");
        btnAutorizarCompra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAutorizarCompraActionPerformed(evt);
            }
        });
        getContentPane().add(btnAutorizarCompra);
        btnAutorizarCompra.setBounds(300, 270, 300, 20);

        tblPendentes.setMinimumSize(new java.awt.Dimension(500, 500));
        atualizaTabela();
        jScrollPane1.setViewportView(tblPendentes);

        getContentPane().add(jScrollPane1);
        jScrollPane1.setBounds(40, 120, 570, 130);

        btnCancelar.setText("Cancelar");
        btnCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarActionPerformed(evt);
            }
        });
        getContentPane().add(btnCancelar);
        btnCancelar.setBounds(390, 300, 110, 20);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnAutorizarCompraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAutorizarCompraActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnAutorizarCompraActionPerformed

    private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnCancelarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new FrmProdutosPendentes().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAutorizarCompra;
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnDesmarcar;
    private javax.swing.JButton btnMarcar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTable tblPendentes;
    // End of variables declaration//GEN-END:variables

    private void atualizaTabela() {
        Tabela tabela = new Tabela(5, new String[] {"Produto", "Fornecedor"}, 3);
        DefaultTableModel modelo = new DefaultTableModel(tabela.getCelulas(),
                tabela.getNomeColunas());
       
       tblPendentes.setModel(modelo);
    }
}
TOP

Related Classes of controleEstoque.formularios.FrmProdutosPendentes

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.