/*
* ListadoPlantillas.java
*
* Created on 2 de junio de 2008, 06:21 PM
*/
package gafetes;
import gafetes.beans.Template;
/**
*
* @author jalafita
*/
public class ListadoPlantillas extends javax.swing.JFrame {
/** Creates new form ListadoPlantillas */
public ListadoPlantillas() {
initComponents();
}
/** 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.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jPanel5 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().add(jPanel1, java.awt.BorderLayout.EAST);
getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);
getContentPane().add(jPanel3, java.awt.BorderLayout.WEST);
jButton1.setText("Editar");
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton1MouseClicked(evt);
}
});
jPanel4.add(jButton1);
jButton2.setText("Cerrar");
jPanel4.add(jButton2);
getContentPane().add(jPanel4, java.awt.BorderLayout.NORTH);
jPanel5.setLayout(new java.awt.GridLayout());
jPanel5.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
jTable1.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"
}
));
jScrollPane1.setViewportView(jTable1);
jPanel5.add(jScrollPane1);
getContentPane().add(jPanel5, java.awt.BorderLayout.CENTER);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
// TODO add your handling code here:
Template t = new Template();
t.setId(1);
t.setDireccion("Calle Tonina");
t.setNombre("SMO");
t.setRuta("gafetes.jasper");
t.setRutaReverso("reverso.jasper");
TemplateForm tf = new TemplateForm(this, true );
tf.setEditMode(t);
tf.setVisible(true);
}//GEN-LAST:event_jButton1MouseClicked
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ListadoPlantillas().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
// End of variables declaration//GEN-END:variables
}