Top Banner
UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECAS UNIDAD ACADÉMICA DE PINOS TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN MANUAL TECNICO SISTEMA BIBLIOTECARIO
72

Manual tecnico

Jan 28, 2015

Download

Education

481200601

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

MANUAL

TECNICO

SISTEMA BIBLIOTECARIO

Page 2: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

1:Este código es la función de buscar libro con este código le damos funcionamiento a pequeño buscador implementado.

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

package Interfaces;

import java.awt.Color;

/**

*

* @author loreley

*/

public class BuscarLibro extends javax.swing.JDialog {

/**

* Creates new form Buscar_Usuarios

*/

public BuscarLibro(java.awt.Frame parent, boolean modal) {

super(parent, modal);

this.getContentPane().setBackground(Color.PINK);

initComponents();

}

Page 3: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

/**

* 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();

jButton1 = new javax.swing.JButton();

jScrollPane1 = new javax.swing.JScrollPane();

jTable1 = new javax.swing.JTable();

jButton2 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

jButton1.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton1.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton1.setText("Buscar");

Page 4: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jButton1.setBorder(new javax.swing.border.SoftBevelBorder(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},

{null, null, null, null},

{null, null, null, null},

{null, null, null, null},

{null, null, null, null},

{null, null, null, null},

{null, null, null, null},

{null, null, null, null}

},

new String [] {

"Id", "Nombre", "Autor", "Editorial"

}

));

jScrollPane1.setViewportView(jTable1);

Page 5: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jButton2.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton2.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton2.setText("Prestamos");

jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

}

});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addComponent(jTextField1)

.addGap(18, 18, 18)

Page 6: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addComponent(jButton1))

.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jButton2)

.addContainerGap(18, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jButton2))

.addGroup(layout.createSequentialGroup()

.addGap(22, 22, 22)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton1))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)))

.addGap(220, 220, 220))

Page 7: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

Prestamos home=new Prestamos();

2:Este código nos da la función de buscar usuarios en el pequeño buscador donde nos da por el nombre y matricula.

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

package Interfaces;

import java.awt.Color;

Page 8: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

/**

*

* @author loreley

*/

public class BuscarUsuarios extends javax.swing.JDialog {

/**

* Creates new form Buscar_Usuarios

*/

public BuscarUsuarios(java.awt.Frame parent, boolean modal) {

super(parent, modal);

this.getContentPane().setBackground(Color.PINK);

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.

*/

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents

private void initComponents() {

Page 9: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jTextField1 = new javax.swing.JTextField();

jButton1 = new javax.swing.JButton();

jScrollPane1 = new javax.swing.JScrollPane();

jTable1 = new javax.swing.JTable();

jButton2 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

jButton1.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton1.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton1.setText("Buscar");

jButton1.setBorder(new javax.swing.border.SoftBevelBorder(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},

Page 10: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

{null, null, null},

{null, null, null},

{null, null, null},

{null, null, null},

{null, null, null},

{null, null, null}

},

new String [] {

"Matricula o No. Empleado", "Nombre", "Carrera o Area"

}

));

jScrollPane1.setViewportView(jTable1);

jButton2.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton2.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton2.setText("Prestamos");

jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

}

Page 11: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton1))

.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 387, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)

.addComponent(jButton2)

.addContainerGap())

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

Page 12: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jButton2))

.addGroup(layout.createSequentialGroup()

.addGap(22, 22, 22)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton1))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)))

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

Prestamos home=new Prestamos();

home.show();

this.dispose();

Page 13: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

}//GEN-LAST:event_jButton2ActionPerformed

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JTable jTable1;

private javax.swing.JTextField jTextField1;

// End of variables declaration//GEN-END:variables

}

Page 14: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

3:Formulario de acceso en este código le damos la funcionalidad de registro donde los mismos se guardaran en la base de datos y nos ayuda a guardarlos según los datos .

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package proyecto_conexion;

import java.awt.Color;

import javax.swing.JOptionPane;

/**

*

* @author teresa

Page 15: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

*/

public class Formulariodeacceso extends javax.swing.JFrame {

/**

* Creates new form Inscripciones

*/

public Formulariodeacceso() {

this.getContentPane().setBackground(Color.PINK);

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.

*/

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents

private void initComponents() {

jDesktopPane1 = new javax.swing.JDesktopPane();

btnsalir = new javax.swing.JButton();

jLabel1 = new javax.swing.JLabel();

Page 16: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jLabel2 = new javax.swing.JLabel();

jPasswordField1 = new javax.swing.JPasswordField();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

cbxuser = new javax.swing.JComboBox();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

btnsalir.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

btnsalir.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

btnsalir.setText("Salir");

btnsalir.setBorder(new javax.swing.border.SoftBevelBorder(0));

btnsalir.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

btnsalirActionPerformed(evt);

}

});

jLabel1.setFont(new java.awt.Font("Abyssinica SIL", 0, 18)); // NOI18N

jLabel1.setText("Usuario");

jLabel1.setBorder(new javax.swing.border.SoftBevelBorder(0));

Page 17: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jLabel2.setFont(new java.awt.Font("Abyssinica SIL", 0, 18)); // NOI18N

jLabel2.setText("Contraseña");

jLabel2.setBorder(new javax.swing.border.SoftBevelBorder(0));

jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/images.jpeg"))); // NOI18N

jLabel3.setBorder(new javax.swing.border.SoftBevelBorder(0));

jLabel4.setFont(new java.awt.Font("Droid Sans Fallback", 3, 24)); // NOI18N

jLabel4.setText("REGISTRO DE INSCRIPCIONES");

jButton1.setBackground(javax.swing.UIManager.getDefaults().getColor("TextArea.selectionBackground"));

jButton1.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton1.setText("Entrar");

jButton1.setBorder(new javax.swing.border.SoftBevelBorder(0));

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

}

});

Page 18: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

cbxuser.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Administrador", "Secretaria" }));

cbxuser.setBorder(null);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addComponent(jLabel3)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 385, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

.addGroup(layout.createSequentialGroup()

.addGap(42, 42, 42)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel2)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

Page 19: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addGroup(layout.createSequentialGroup()

.addGap(43, 43, 43)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(cbxuser, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(layout.createSequentialGroup()

.addGap(73, 73, 73)

.addComponent(btnsalir, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGap(0, 0, Short.MAX_VALUE))))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addComponent(jLabel4)

.addGap(34, 34, 34)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel1)

.addComponent(cbxuser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))

Page 20: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addComponent(jLabel3))

.addGap(58, 58, 58)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(btnsalir)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void btnsalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnsalirActionPerformed

System.exit(0);

}//GEN-LAST:event_btnsalirActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

Page 21: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

String user=(cbxuser.getSelectedItem().toString());

String psw=(jPasswordField1.getText());

if (psw.equals("lorena")&&user.equals("Administrador")){

JOptionPane.showMessageDialog(null,"WELLCOME");

menu home=new menu();

home.show();

this.dispose();

}//GEN-LAST:event_jButton1ActionPerformed

else{

if (psw.equals("diaz")&&user.equals("Secretaria")){

JOptionPane.showMessageDialog(null,"WELLCOME");

menu home=new menu();

home.show();

this.dispose();

}else

JOptionPane.showMessageDialog(null,"Tu contraseña es incorrecta verifica");

}

}

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

/* Set the Nimbus look and feel */

Page 22: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

}

}

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(Formulariodeacceso.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Formulariodeacceso.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Formulariodeacceso.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

Page 23: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

java.util.logging.Logger.getLogger(Formulariodeacceso.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

}

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new Formulariodeacceso().setVisible(true);

}

});

}

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton btnsalir;

private javax.swing.JComboBox cbxuser;

private javax.swing.JButton jButton1;

private javax.swing.JDesktopPane jDesktopPane1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JPasswordField jPasswordField1;

Page 24: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

// End of variables declaration//GEN-END:variables

}

4:este código nos ayuda con algunos botones y sus funciones implementados en el sistema.

package proyecto_conexion;

import java.awt.Color;

public class inicio extends javax.swing.JFrame {

clases.guardar guardar = new clases.guardar();

clases.buscar buscar = new clases.buscar();

clases.eliminar eliminar = new clases.eliminar();

clases.mostrar mostrar = new clases.mostrar();

clases.actualizar actualizar = new clases.actualizar();

public inicio() {

this.getContentPane().setBackground(Color.PINK);

initComponents();

Page 25: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

mostrar.mostrar_datos();

}

/**

* 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")

String matricula;

String nombres;

String apellidos;

String edad;

String dirección;

String elegir_id;

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents

private void initComponents() {

m = new javax.swing.JTextField();

n = new javax.swing.JTextField();

d = new javax.swing.JTextField();

Page 26: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

a = new javax.swing.JTextField();

e = new javax.swing.JTextField();

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

jScrollPane1 = new javax.swing.JScrollPane();

Mitabla = new javax.swing.JTable();

jButton2 = new javax.swing.JButton();

jButton3 = new javax.swing.JButton();

jButton4 = new javax.swing.JButton();

jButton5 = new javax.swing.JButton();

buscar_ident = new javax.swing.JTextField();

jButton6 = new javax.swing.JButton();

jButton7 = new javax.swing.JButton();

jButton8 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setFont(new java.awt.Font("Abyssinica SIL", 0, 18)); // NOI18N

Page 27: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jLabel1.setText("Matricula:");

jLabel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jLabel2.setFont(new java.awt.Font("Abyssinica SIL", 0, 18)); // NOI18N

jLabel2.setText("Nombres:");

jLabel2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jLabel3.setFont(new java.awt.Font("Abyssinica SIL", 0, 18)); // NOI18N

jLabel3.setText("Direccion:");

jLabel3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jLabel4.setFont(new java.awt.Font("Abyssinica SIL", 0, 18)); // NOI18N

jLabel4.setText("Apellidos:");

jLabel4.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jLabel5.setFont(new java.awt.Font("Abyssinica SIL", 0, 18)); // NOI18N

jLabel5.setText("Edad:");

jLabel5.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jLabel6.setFont(new java.awt.Font("Abyssinica SIL", 0, 18)); // NOI18N

Page 28: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jLabel6.setText("Buscar:");

jLabel6.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton1.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton1.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton1.setText("Buscar");

jButton1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

}

});

Mitabla.setModel(new javax.swing.table.DefaultTableModel(

new Object [][] {

{null, null, null, null, null},

{null, null, null, null, null},

{null, null, null, null, null},

{null, null, null, null, null},

{null, null, null, null, null},

{null, null, null, null, null},

Page 29: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

{null, null, null, null, null},

{null, null, null, null, null},

{null, null, null, null, null},

{null, null, null, null, null},

{null, null, null, null, null}

},

new String [] {

"Matricula", "Nombres", "Apellidos", "Edad", "Dirección"

}

));

jScrollPane1.setViewportView(Mitabla);

jButton2.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton2.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton2.setText("Guardar");

jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

}

});

Page 30: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jButton3.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton3.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton3.setText("Actualizar");

jButton3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton3ActionPerformed(evt);

}

});

jButton4.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton4.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton4.setText("Eliminar");

jButton4.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton4ActionPerformed(evt);

}

});

Page 31: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jButton5.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton5.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton5.setText("Limpiar");

jButton5.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton5ActionPerformed(evt);

}

});

jButton6.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton6.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton6.setText("Salir de la Aplicacion");

jButton6.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton6.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton6ActionPerformed(evt);

}

});

Page 32: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jButton7.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton7.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton7.setText("Generar Constancia");

jButton7.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton8.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton8.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton8.setText("Ayuda");

jButton8.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton8ActionPerformed(evt);

}

});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

Page 33: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addComponent(jButton6))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)

.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()

.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(a, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()

.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(e, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))

Page 34: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)

.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(n, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(m, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()

.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(42, 42, 42)

.addComponent(d, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(376, 376, 376)

.addComponent(jButton8))

.addGroup(layout.createSequentialGroup()

Page 35: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))))))

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addComponent(jButton3)

.addGap(18, 18, 18)

.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton7))

.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 518, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(layout.createSequentialGroup()

.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(42, 42, 42)

.addComponent(buscar_ident, javax.swing.GroupLayout.PREFERRED_SIZE, 352, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)))

Page 36: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addGap(0, 0, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(24, 24, 24)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel1)

.addComponent(m, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addComponent(jButton8))

.addGap(19, 19, 19)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(n, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addGap(15, 15, 15)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel4)

.addComponent(a, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(24, 24, 24)

Page 37: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel5)

.addComponent(e, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(14, 14, 14)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel3)

.addComponent(d, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 71, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel6)

.addComponent(buscar_ident, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)

Page 38: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton7))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jButton6))

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

matricula = m.getText();

nombres = n.getText();

apellidos = a.getText();

edad = e.getText();

dirección = d.getText();

//capturamos los datos digitados en los campos de texto

guardar.registrar_alumno(matricula, nombres, apellidos, edad, dirección);

new clases.mostrar().mostrar_datos();

Page 39: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

//Aquí lo que hacemos es enviar los datos de los campos de texto en variables a la clase guardar.

m.setText("");

n.setText("");

a.setText("");

e.setText("");

d.setText("");

//Despues de Guardar Limpiamos los campos.

}//GEN-LAST:event_jButton2ActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed

elegir_id = buscar_ident.getText();

nombres = n.getText();

apellidos = a.getText();

edad = e.getText();

dirección = d.getText();

actualizar.actualizar_alumno(elegir_id, matricula, nombres, apellidos, edad, dirección);

}//GEN-LAST:event_jButton3ActionPerformed

Page 40: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed

eliminar.eliminar_alumno(buscar_ident.getText());

m.setText("");

n.setText("");

a.setText("");

e.setText("");

d.setText("");

buscar_ident.setText("");

//Solo se limpian los campos.

}//GEN-LAST:event_jButton4ActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

buscar.buscar_alumno(buscar_ident.getText());

}//GEN-LAST:event_jButton1ActionPerformed

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed

Page 41: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

m.setText("");

n.setText("");

a.setText("");

e.setText("");

d.setText("");

buscar_ident.setText("");

}//GEN-LAST:event_jButton5ActionPerformed

private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed

Formulariodeacceso inicio = new Formulariodeacceso();

inicio.show();

this.dispose();

}//GEN-LAST:event_jButton6ActionPerformed

private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed

Ayuda inicio = new Ayuda();

inicio.show();

this.dispose();

}//GEN-LAST:event_jButton8ActionPerformed

Page 42: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

// Variables declaration - do not modify//GEN-BEGIN:variables

public static javax.swing.JTable Mitabla;

public static javax.swing.JTextField a;

public static javax.swing.JTextField buscar_ident;

public static javax.swing.JTextField d;

public static javax.swing.JTextField e;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JButton jButton4;

private javax.swing.JButton jButton5;

private javax.swing.JButton jButton6;

private javax.swing.JButton jButton7;

private javax.swing.JButton jButton8;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JScrollPane jScrollPane1;

public static javax.swing.JTextField m;

Page 43: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

public static javax.swing.JTextField n;

// End of variables declaration//GEN-END:variables

}

Page 44: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

5: Los siguientes códigos son el de menú y la opción de ayuda en estos se le da la diferente funcionalidad según lo requerido.

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

package proyecto_conexion;

import java.awt.Color;

/**

*

* @author loreley código del menú

*/

public class menu extends javax.swing.JFrame {

/**

* Creates new form menu

*/

Page 45: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

public menu() {

this.getContentPane().setBackground(Color.PINK);

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.

*/

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents

private void initComponents() {

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jMenuBar2 = new javax.swing.JMenuBar();

jMenu2 = new javax.swing.JMenu();

jMenu3 = new javax.swing.JMenu();

jButton2 = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jMenuItem2 = new javax.swing.JMenuItem();

Page 46: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jMenuItem1.setText("jMenuItem1");

jMenuItem3.setText("jMenuItem3");

jMenu2.setText("File");

jMenuBar2.add(jMenu2);

jMenu3.setText("Edit");

jMenuBar2.add(jMenu3);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jButton2.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton2.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton2.setText("Ayuda");

jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

}

Page 47: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

});

jMenu1.setText("Menu");

jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem2.setText("Inicio");

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

}

});

jMenu1.add(jMenuItem2);

jMenuBar1.add(jMenu1);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

Page 48: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addGap(0, 332, Short.MAX_VALUE)

.addComponent(jButton2))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(247, Short.MAX_VALUE))

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

Ayuda inicio =new Ayuda();

inicio.show();

this.dispose();

}//GEN-LAST:event_jButton2ActionPerformed

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed

inicio inicio =new inicio();

Page 49: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

inicio.show();

this.dispose();

}//GEN-LAST:event_jMenuItem2ActionPerformed

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton jButton2;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenu jMenu2;

private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuBar jMenuBar2;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JMenuItem jMenuItem3;

// End of variables declaration//GEN-END:variables

}

Código de la opción ayuda:

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

Page 50: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

package proyecto_conexion;

import java.awt.Color;

import javax.swing.ImageIcon;

/**

*

* @author teresa

*/

public class Ayuda extends javax.swing.JFrame {

/**

* Creates new form documento

*/

public Ayuda() {

this.getContentPane().setBackground(Color.PINK);

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

Page 51: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

* regenerated by the Form Editor.

*/

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents

private void initComponents() {

jButton1 = new javax.swing.JButton();

jButton2 = new javax.swing.JButton();

jScrollPane1 = new javax.swing.JScrollPane();

txadescripcion = new javax.swing.JTextArea();

cbopersonajes = new javax.swing.JComboBox();

jButton3 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jButton1.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton1.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton1.setText("Formulario");

jButton1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

Page 52: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

jButton1ActionPerformed(evt);

}

});

jButton2.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton2.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton2.setText("Inicio");

jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

}

});

txadescripcion.setColumns(20);

txadescripcion.setRows(5);

jScrollPane1.setViewportView(txadescripcion);

cbopersonajes.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Formulario de acceso", "Menu", "Inicio" }));

cbopersonajes.setBorder(null);

cbopersonajes.addActionListener(new java.awt.event.ActionListener() {

Page 53: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

public void actionPerformed(java.awt.event.ActionEvent evt) {

cbopersonajesActionPerformed(evt);

}

});

jButton3.setBackground(javax.swing.UIManager.getDefaults().getColor("FormattedTextField.selectionBackground"));

jButton3.setFont(new java.awt.Font("Purisa", 1, 18)); // NOI18N

jButton3.setText("Menu");

jButton3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

jButton3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton3ActionPerformed(evt);

}

});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addContainerGap()

Page 54: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addComponent(cbopersonajes, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)

.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(81, 81, 81))

.addGroup(layout.createSequentialGroup()

.addGap(14, 14, 14)

.addComponent(jButton1)

.addGap(32, 32, 32)

.addComponent(jButton2)

.addGap(37, 37, 37)

.addComponent(jButton3)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(cbopersonajes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

Page 55: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton2)

.addComponent(jButton1)

.addComponent(jButton3))

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

inicio inicio =new inicio();

inicio.show();

this.dispose();

}//GEN-LAST:event_jButton2ActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

Formulariodeacceso inicio=new Formulariodeacceso();

inicio.show();

Page 56: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

this.dispose();

}//GEN-LAST:event_jButton1ActionPerformed

private void cbopersonajesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbopersonajesActionPerformed

String personajes;

personajes=(cbopersonajes.getSelectedItem().toString());

if(personajes.equals("Formulario de acceso")){

txadescripcion.setText("Elegir el usuario y asignar la contraseña, presionar el boton de entrar donde te mandara a la ventana de menus");

txadescripcion.append("");

}

else

if(personajes.equals("Menu")){

txadescripcion.setText("Elegir el boton para que te mande a la ventana deseada");

txadescripcion.append("");

}

else

if(personajes.equals("Inicio")){

txadescripcion.setText("En esta ventana, podras realizar todas las opciones disponibles para un alumno");

txadescripcion.append("");

}

}//GEN-LAST:event_cbopersonajesActionPerformed

Page 57: Manual tecnico

UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECASUNIDAD ACADÉMICA DE PINOS

TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed

menu inicio =new menu();

inicio.show();

this.dispose();

}//GEN-LAST:event_jButton3ActionPerformed

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JComboBox cbopersonajes;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JTextArea txadescripcion;

// End of variables declaration//GEN-END:variables

}


Related Documents