/** * * @author Hector Rodriguez */ package com.zazil.dwh.app.gui.bancos; import java.awt.BorderLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.JTable; public class TablaSaldosVentana extends javax.swing.JDialog { private JTable tablaP; private JLabel jlbEmpresa; private JButton jbtGrafico; public TablaSaldosVentana(JFrame owner, boolean modal, JTable tabla) { super(owner, modal); this.tablaP = tabla; this.iniciarComponentes(); this.setVisible(true); } private void iniciarComponentes(){ this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); this.setSize(500, 200); this.getContentPane().setLayout(new BorderLayout()); JScrollPane jsp = new JScrollPane(tablaP); this.jlbEmpresa = new JLabel("Estados de cuenta: "); this.jbtGrafico = new JButton("Grafico"); //this.getContentPane().getLayout(). this.getContentPane().add(jsp, BorderLayout.CENTER); this.getContentPane().add(jlbEmpresa, BorderLayout.NORTH); this.getContentPane().add(jbtGrafico, BorderLayout.SOUTH); } /** * 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() { setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 596, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 379, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing // TODO add your handling code here: this.getOwner().setVisible(true); }//GEN-LAST:event_formWindowClosing // Variables declaration - do not modify//GEN-BEGIN:variables // End of variables declaration//GEN-END:variables }