Se queda uno ciego intentando depurar este problema leyendo el código en este foro, porque cargarlo en el editor de NetBeans no ayuda: faltan dependencias y recursos.
Te propongo algo más sencillo: crea un simple JFrame de prueba con NetBeans, incluye una tabla inicializada ya con datos, y ese spinner, de forma que sea compilable y ejecutable, y que se vea el problema.
Publícalo aquí cuando lo tengas, si es que no has visto tu mismo la solución al hacerlo así.
Buen dia a todos,
Tengo un problema que he intentado rsolver hace casi ya una semana y no doy con la solucion.
Tengo un Jtable al cual le agregue un cellEditor y a este a suvez le agregue un JSpinner, lo que yo necesitaba era que en la lista de productos cuando la cantidad utilizada sobrepasara la cantidad entrega me pusiera en el campo la cantidad maxima que es igual a la entregada, esto me esta funcionando muy bien si le doy click en una celda de la misma columna, pero si le doy click en una column diferente no me toma los cambios.
Les dejo el codigo y una imagen para que entienda un poco de que se trata.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Vistas;
import Modelo.Conexion;
import Controlador.SeguridadAceso;
import Controlador.ListaProgramacion;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Dialog.ModalExclusionType;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.EventObject;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.event.AncestorEvent;
import javax.swing.event.ChangeEvent;
import javax.swing.table.DefaultTableModel;
import java.awt.event.FocusListener;
import java.util.regex.PatternSyntaxException;
import javax.swing.DefaultCellEditor;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JSpinner;
import javax.swing.JTextField;
import javax.swing.RowFilter;
import javax.swing.SpinnerNumberModel;
import javax.swing.event.AncestorListener;
import javax.swing.event.ChangeListener;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;
/**
*
* @author Jean Paul Villaquiran
*/
public class PnlPaciente extends javax.swing.JDialog {
private String consecutivo = "",consecutivoReg;
private ArrayList<Object[]> registro;
private DefaultTableModel defaultTableModel1;
private DefaultTableModel defaultTableModel2;
private DefaultTableModel defaultTableModel3;
private ArrayList<Object[]> datos;
private ArrayList<ListaProgramacion> registropaciente;
final TableRowSorter<DefaultTableModel> sorter1;
final TableRowSorter<DefaultTableModel> sorter2;
final TableRowSorter<DefaultTableModel> sorter3;
Conexion conexion;
ListaProgramacion listaProgramacion;
private int indiceEntradaActual;
PnlAgregarMedicaInsumo pnlAgregarMedicaInsumo;
PnlAgregarPaquete pnlAgregarPaquete;
String codproducto;
String nomProducto;
private int cantidad,cantidad2,devolucion;
private int fila = 0,fila2,fila3,cantentregada,cantUtilizada,columna;
private String codigoUsuario = "";
/**
* Creates new form PnlPaciente
*/
public PnlPaciente(String consecutivo,String codigoUsuario){
conexion = new Conexion();
this.consecutivo = consecutivo;
this.codigoUsuario = codigoUsuario;
initComponents();
llenarCampos();
llenarTablaMedicamento();
llenarTablaFisico();
TableColumnModel tcm = jTable1.getColumnModel();
TableColumn tc = tcm.getColumn(3);
tc.setCellEditor(new SpinnerEditor());
TableColumnModel tcmFis = jTable2.getColumnModel();
TableColumn tcFis = tcmFis.getColumn(3);
TableColumnModel tcmOtro = jTable3.getColumnModel();
TableColumn tcOtro = tcmOtro.getColumn(3);
//tcOtro.setCellEditor(new SpinnerEditor());
defaultTableModel1 = (DefaultTableModel)jTable1.getModel();
defaultTableModel2 = (DefaultTableModel)jTable2.getModel();
defaultTableModel3 = (DefaultTableModel)jTable3.getModel();
sorter1 = new TableRowSorter<DefaultTableModel>(defaultTableModel1);
sorter2 = new TableRowSorter<DefaultTableModel>(defaultTableModel2);
sorter3 = new TableRowSorter<DefaultTableModel>(defaultTableModel3);
jTable1.setRowSorter(sorter1);
jTable2.setRowSorter(sorter2);
jTable3.setRowSorter(sorter3);
this.setLocationRelativeTo(new PnlProgramacion());
validarAcceso();
this.setModal(true);
this.setVisible(true);
}
public PnlPaciente(String consecutivo,String codigoUsuario,String Estado)
{
conexion = new Conexion();
this.consecutivo = consecutivo;
this.codigoUsuario = codigoUsuario;
initComponents();
llenarCampos();
consultarTableMedicamento();
consultarTablaFisico();
TableColumnModel tcm = jTable1.getColumnModel();
TableColumn tc = tcm.getColumn(3);
tc.setCellEditor(new SpinnerEditor());
TableColumnModel tcmFis = jTable2.getColumnModel();
TableColumn tcFis = tcmFis.getColumn(3);
TableColumnModel tcmOtro = jTable3.getColumnModel();
TableColumn tcOtro = tcmOtro.getColumn(3);
//tcOtro.setCellEditor(new SpinnerEditor());
defaultTableModel1 = (DefaultTableModel)jTable1.getModel();
defaultTableModel2 = (DefaultTableModel)jTable2.getModel();
defaultTableModel3 = (DefaultTableModel)jTable3.getModel();
sorter1 = new TableRowSorter<DefaultTableModel>(defaultTableModel1);
sorter2 = new TableRowSorter<DefaultTableModel>(defaultTableModel2);
sorter3 = new TableRowSorter<DefaultTableModel>(defaultTableModel3);
jTable1.setRowSorter(sorter1);
jTable2.setRowSorter(sorter2);
jTable3.setRowSorter(sorter3);
this.setLocationRelativeTo(new PnlProgramacion());
validarAcceso();
this.setModal(true);
this.setVisible(true);
}
/**
* 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">
private void initComponents() {
jTextField1 = new javax.swing.JTextField();
jPanel1 = new javax.swing.JPanel();
lblNombre = new javax.swing.JLabel();
txtNombre = new javax.swing.JTextField();
lblIdentificacion = new javax.swing.JLabel();
txtIdentificacion = new javax.swing.JTextField();
lblIdentificacion1 = new javax.swing.JLabel();
txtIngreso = new javax.swing.JTextField();
lblNombre1 = new javax.swing.JLabel();
txtSala = new javax.swing.JTextField();
lblNombre2 = new javax.swing.JLabel();
txtDate = new javax.swing.JTextField();
lblIdentificacion2 = new javax.swing.JLabel();
txtnomProce = new javax.swing.JTextField();
lblIdentificacion3 = new javax.swing.JLabel();
txtMedico = new javax.swing.JTextField();
lblIdentificacion6 = new javax.swing.JLabel();
txtcodProce = new javax.swing.JTextField();
lblNombre3 = new javax.swing.JLabel();
txtEstado = new javax.swing.JTextField();
jPanel2 = new javax.swing.JPanel();
jButton2 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton12 = new javax.swing.JButton();
jTabbedPane2 = new javax.swing.JTabbedPane();
jPanel3 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jLabel1 = new javax.swing.JLabel();
txtFiltro = new javax.swing.JTextField();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jbtnGrabaMed = new javax.swing.JButton();
jbnAgregraMed = new javax.swing.JButton();
jbnQuitarMed = new javax.swing.JButton();
jbnActualizar = new javax.swing.JButton();
jPanel4 = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
jTable2 = new javax.swing.JTable();
jLabel2 = new javax.swing.JLabel();
txtFiltro1 = new javax.swing.JTextField();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jButton14 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jbnQuitarFis = new javax.swing.JButton();
jbActualizarFisico = new javax.swing.JButton();
jPanel5 = new javax.swing.JPanel();
jScrollPane4 = new javax.swing.JScrollPane();
jTable3 = new javax.swing.JTable();
jLabel3 = new javax.swing.JLabel();
txtFiltro2 = new javax.swing.JTextField();
jButton9 = new javax.swing.JButton();
jButton10 = new javax.swing.JButton();
jButton15 = new javax.swing.JButton();
jButton13 = new javax.swing.JButton();
jButton16 = new javax.swing.JButton();
jTextField1.setText("jTextField1");
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos del Paciente"));
lblNombre.setFont(new java.awt.Font("Tahoma", 1, 12));
lblNombre.setText("Nombre");
txtNombre.setEditable(false);
lblIdentificacion.setFont(new java.awt.Font("Tahoma", 1, 12));
lblIdentificacion.setText("Identificación");
txtIdentificacion.setEditable(false);
txtIdentificacion.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txtIdentificacionActionPerformed(evt);
}
});
lblIdentificacion1.setFont(new java.awt.Font("Tahoma", 1, 12));
lblIdentificacion1.setText("Ingreso");
txtIngreso.setEditable(false);
txtIngreso.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txtIngresoActionPerformed(evt);
}
});
lblNombre1.setFont(new java.awt.Font("Tahoma", 1, 12));
lblNombre1.setText("Fecha y hora");
txtSala.setEditable(false);
lblNombre2.setFont(new java.awt.Font("Tahoma", 1, 12));
lblNombre2.setText("Sala");
txtDate.setEditable(false);
lblIdentificacion2.setFont(new java.awt.Font("Tahoma", 1, 12));
lblIdentificacion2.setText("Procedimiento");
txtnomProce.setEditable(false);
lblIdentificacion3.setFont(new java.awt.Font("Tahoma", 1, 12));
lblIdentificacion3.setText("Medico");
txtMedico.setEditable(false);
txtMedico.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txtMedicoActionPerformed(evt);
}
});
lblIdentificacion6.setFont(new java.awt.Font("Tahoma", 1, 12));
lblIdentificacion6.setText("Ingreso");
txtcodProce.setEditable(false);
lblNombre3.setFont(new java.awt.Font("Tahoma", 1, 12));
lblNombre3.setText("Estado");
txtEstado.setEditable(false);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(105, 105, 105)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblIdentificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(lblIdentificacion6, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lblIdentificacion1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(lblIdentificacion2, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblIdentificacion3, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(25, 25, 25)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(txtIdentificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(lblNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(txtNombre, javax.swing.GroupLayout.DEFAULT_SIZE, 428, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtcodProce, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE)
.addComponent(txtIngreso, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtnomProce, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 527, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(lblNombre2, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(txtSala, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(lblNombre1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(12, 12, 12)
.addComponent(txtDate, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(txtMedico, javax.swing.GroupLayout.DEFAULT_SIZE, 436, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lblNombre3, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(txtEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lblNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblIdentificacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(txtIdentificacion, 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)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(lblIdentificacion1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addGap(205, 205, 205))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtIngreso, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblIdentificacion6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtDate, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblNombre1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(lblNombre2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(txtSala, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(txtcodProce)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtnomProce, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblIdentificacion2, 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)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(txtMedico, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(lblIdentificacion3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(67, 67, 67))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblNombre3, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE))
.addContainerGap()))))))
);
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cancel_32x32.png"))); // NOI18N
jButton2.setText("<html>Cirugia
Cancelada</html>");
jButton2.setEnabled(false);
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/printer.png"))); // NOI18N
jButton1.setText("<html>\nImprimir Canasta
Productos\n</html>");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/check_mark_32x32.png"))); // NOI18N
jButton4.setText("Confirmar Gasto");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jButton12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/borrar.png"))); // NOI18N
jButton12.setText("<html>Devolución
Canasta</html>");
jButton12.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton12ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 390, Short.MAX_VALUE)
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)
.addComponent(jButton2)
.addComponent(jButton12))
.addComponent(jButton4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
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, 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, 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, null, null, null},
{null, null, null, null, null},
{null, null, null, null, null},
{null, null, null, null, null}
},
new String [] {
"Codigo", "Nombre", "Cant. Entregada", "Cant. Utilizada", "Devolución"
}
) {
Class[] types = new Class [] {
java.lang.Object.class, java.lang.Object.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class
};
boolean[] canEdit = new boolean [] {
false, false, false, true, false
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
jTable1.setRowHeight(25);
jTable1.getTableHeader().setReorderingAllowed(false);
jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
jTable1MouseReleased(evt);
}
});
jScrollPane1.setViewportView(jTable1);
jTable1.getColumnModel().getColumn(0).setPreferredWidth(20);
jTable1.getColumnModel().getColumn(1).setPreferredWidth(400);
jTable1.getColumnModel().getColumn(2).setPreferredWidth(5);
jTable1.getColumnModel().getColumn(3).setPreferredWidth(5);
jTable1.getColumnModel().getColumn(4).setPreferredWidth(5);
jLabel1.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel1.setText("Filtro:");
jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/filtro.png"))); // NOI18N
jButton5.setText("Aplicar Filtro");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/delete 16x16.png"))); // NOI18N
jButton6.setText("Limpiar Filtro");
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
jbtnGrabaMed.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/save.png"))); // NOI18N
jbtnGrabaMed.setText("Grabar");
jbtnGrabaMed.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jbtnGrabaMedActionPerformed(evt);
}
});
jbnAgregraMed.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/1.png"))); // NOI18N
jbnAgregraMed.setToolTipText("Agregar Producto");
jbnAgregraMed.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jbnAgregraMedActionPerformed(evt);
}
});
jbnQuitarMed.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/2.png"))); // NOI18N
jbnQuitarMed.setToolTipText("Eliminar Producto");
jbnQuitarMed.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jbnQuitarMedActionPerformed(evt);
}
});
jbnActualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Refresh-22x22.png"))); // NOI18N
jbnActualizar.setToolTipText("Actualizar");
jbnActualizar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jbnActualizarActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1001, Short.MAX_VALUE)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtFiltro, javax.swing.GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE)
.addGap(10, 10, 10)
.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(59, 59, 59)
.addComponent(jbtnGrabaMed, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jbnAgregraMed, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jbnQuitarMed, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jbnActualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 332, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jbnAgregraMed, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jbnQuitarMed, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jbnActualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtFiltro, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1)
.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 30, Short.MAX_VALUE)
.addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
.addComponent(jbtnGrabaMed, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18))
);
jTabbedPane2.addTab("Medicamentos e insumos", jPanel3);
jTable2.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, 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, 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, null, null, null},
{null, null, null, null, null},
{null, null, null, null, null},
{null, null, null, null, null}
},
new String [] {
"Codigo", "Nombre", "Cant. Entregada", "Cant. Utilizada", "Devolución"
}
) {
Class[] types = new Class [] {
java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Integer.class, java.lang.Object.class
};
boolean[] canEdit = new boolean [] {
false, false, false, true, false
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
jTable2.setRowHeight(25);
jTable2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
jTable2MouseReleased(evt);
}
});
jScrollPane2.setViewportView(jTable2);
jTable2.getColumnModel().getColumn(0).setPreferredWidth(20);
jTable2.getColumnModel().getColumn(1).setPreferredWidth(400);
jTable2.getColumnModel().getColumn(2).setPreferredWidth(5);
jTable2.getColumnModel().getColumn(3).setPreferredWidth(5);
jTable2.getColumnModel().getColumn(4).setPreferredWidth(5);
jTable2.getAccessibleContext().setAccessibleName("");
jLabel2.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel2.setText("Filtro:");
jButton7.setIcon(new javax.swing.ImageIcon("F:\\Mis proyectos\\Iconos SISEA\\Resources\\filtro.png")); // NOI18N
jButton7.setText("Aplicar Filtro");
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7ActionPerformed(evt);
}
});
jButton8.setIcon(new javax.swing.ImageIcon("F:\\Mis proyectos\\Proyecto cirugia\\ProgramacionCirugia\\src\\Imagenes\\delete 16x16.png")); // NOI18N
jButton8.setText("Limpiar Filtro");
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton8ActionPerformed(evt);
}
});
jButton14.setIcon(new javax.swing.ImageIcon("F:\\Mis proyectos\\Proyecto cirugia\\ProgramacionCirugia\\src\\Imagenes\\save.png")); // NOI18N
jButton14.setText("Grabar");
jButton14.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton14ActionPerformed(evt);
}
});
jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/1.png"))); // NOI18N
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jbnQuitarFis.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/2.png"))); // NOI18N
jbnQuitarFis.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jbnQuitarFisActionPerformed(evt);
}
});
jbActualizarFisico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Refresh-22x22.png"))); // NOI18N
jbActualizarFisico.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jbActualizarFisicoActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1001, Short.MAX_VALUE)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtFiltro1, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 71, Short.MAX_VALUE)
.addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jbnQuitarFis, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jbActualizarFisico, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 319, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jbnQuitarFis, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jbActualizarFisico, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtFiltro1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2)
.addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, Short.MAX_VALUE)
.addComponent(jButton8, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
.addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jTabbedPane2.addTab("Paquete Quirurgico", jPanel4);
jTable3.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"Codigo", "Nombre", "Cant. Entregada", "Cant. Utilizada", "Devolución"
}
) {
boolean[] canEdit = new boolean [] {
false, false, false, false, true
};
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
jTable3.setRowHeight(25);
jScrollPane4.setViewportView(jTable3);
jTable3.getColumnModel().getColumn(0).setPreferredWidth(20);
jTable3.getColumnModel().getColumn(1).setPreferredWidth(400);
jTable3.getColumnModel().getColumn(2).setPreferredWidth(5);
jTable3.getColumnModel().getColumn(3).setPreferredWidth(5);
jTable3.getColumnModel().getColumn(4).setPreferredWidth(5);
jLabel3.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel3.setText("Filtro:");
jButton9.setIcon(new javax.swing.ImageIcon("F:\\Mis proyectos\\Iconos SISEA\\Resources\\filtro.png")); // NOI18N
jButton9.setText("Aplicar Filtro");
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton9ActionPerformed(evt);
}
});
jButton10.setIcon(new javax.swing.ImageIcon("F:\\Mis proyectos\\Proyecto cirugia\\ProgramacionCirugia\\src\\Imagenes\\delete 16x16.png")); // NOI18N
jButton10.setText("Limpiar Filtro");
jButton10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton10ActionPerformed(evt);
}
});
jButton15.setIcon(new javax.swing.ImageIcon("F:\\Mis proyectos\\Proyecto cirugia\\ProgramacionCirugia\\src\\Imagenes\\save.png")); // NOI18N
jButton15.setText("Grabar");
jButton15.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton15ActionPerformed(evt);
}
});
jButton13.setIcon(new javax.swing.ImageIcon("F:\\Mis proyectos\\Proyecto cirugia\\ProgramacionCirugia\\src\\Imagenes\\1.png")); // NOI18N
jButton13.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton13ActionPerformed(evt);
}
});
jButton16.setIcon(new javax.swing.ImageIcon("F:\\Mis proyectos\\Proyecto cirugia\\ProgramacionCirugia\\src\\Imagenes\\2.png")); // NOI18N
jButton16.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton16ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1001, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtFiltro2, javax.swing.GroupLayout.PREFERRED_SIZE, 447, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE)
.addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel5Layout.createSequentialGroup()
.addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton16, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 328, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton16, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton10, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
.addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 30, Short.MAX_VALUE))
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtFiltro2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3)))
.addContainerGap())
);
jTabbedPane2.addTab("Otros", jPanel5);
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)
.addComponent(jTabbedPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1026, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 450, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}// </editor-fold>
private void txtMedicoActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void txtIngresoActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void txtIdentificacionActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int valor = JOptionPane.showConfirmDialog(null,"¿Deseas cancelar realmente este procedimiento?");
if(JOptionPane.OK_OPTION == valor)
{
new PnlCancelarPaciente(consecutivo);
dispose();
}
}
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String texto = txtFiltro.getText().toUpperCase();
if(texto.length() == 0)
{
sorter1.setRowFilter(null);
}
else
{
try
{
sorter1.setRowFilter(RowFilter.regexFilter(texto,1));
}//fin del try
catch(PatternSyntaxException pse)
{
JOptionPane.showMessageDialog(null,"Error: "+pse,"Error",JOptionPane.ERROR_MESSAGE);
}
}
}
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
sorter1.setRowFilter(null);
txtFiltro.setText("");
}
private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String texto = txtFiltro1.getText().toUpperCase();
if(texto.length() == 0)
{
sorter2.setRowFilter(null);
}
else
{
try
{
sorter2.setRowFilter(RowFilter.regexFilter(texto,1));
}//fin del try
catch(PatternSyntaxException pse)
{
JOptionPane.showMessageDialog(null,"Error: "+pse,"Error",JOptionPane.ERROR_MESSAGE);
}
}
}
private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
sorter2.setRowFilter(null);
txtFiltro1.setText("");
}
private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String texto = txtFiltro2.getText().toUpperCase();
if(texto.length() == 0)
{
sorter3.setRowFilter(null);
}
else
{
try
{
sorter3.setRowFilter(RowFilter.regexFilter(texto,1));
}//fin del try
catch(PatternSyntaxException pse)
{
JOptionPane.showMessageDialog(null,"Error: "+pse,"Error",JOptionPane.ERROR_MESSAGE);
}
}
}
private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
sorter3.setRowFilter(null);
txtFiltro2.setText("");
}
private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int valor = JOptionPane.showConfirmDialog(null,"¿Deseas devolver productos?");
if(JOptionPane.OK_OPTION == valor)
{
int respuesta = 0;
TableModel tableModel = jTable1.getModel();
int cols = tableModel.getColumnCount();
int fils = tableModel.getRowCount();
for(int i = 0; i < fils; i++)
{
jTable1.setValueAt(0, i, 3);
int cantentre = (int)jTable1.getValueAt(i,2);
jTable1.setValueAt(cantentre, i, 4);
}
}
}
private void jbtnGrabaMedActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
guardarDatosMedicamentos();
}
private void jbnAgregraMedActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
//pnlAgregarMedicaInsumo = new PnlAgregarMedicaInsumo();
//pnlAgregarMedicaInsumo.setVisible(true);
pnlAgregarMedicaInsumo = new PnlAgregarMedicaInsumo(PnlPaciente.this,consecutivo);
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
pnlAgregarPaquete = new PnlAgregarPaquete(PnlPaciente.this,consecutivo);
}
private void jbnQuitarMedActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int valor = JOptionPane.showConfirmDialog(null,"¿Deseas eliminar realmente este producto?");
int fila = jTable1.getSelectedRow();
if(JOptionPane.OK_OPTION == valor)
{
ListaProgramacion listaProgramacion = new ListaProgramacion();
listaProgramacion.eliminarMedicamento(consecutivo,defaultTableModel1.getValueAt(fila,0));
defaultTableModel1.removeRow(fila);
}
}
private void jTable1MouseReleased(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
if(evt.getClickCount() == 1)
{
filaSele();
}
}
private void jbnQuitarFisActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int valor = JOptionPane.showConfirmDialog(null,"¿Deseas eliminar realmente este producto?");
int fila = jTable1.getSelectedRow();
if(JOptionPane.OK_OPTION == valor)
{
ListaProgramacion listaProgramacion = new ListaProgramacion();
defaultTableModel2.removeRow(fila2);
}
}
private void jTable2MouseReleased(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
if(evt.getClickCount() == 1)
{
fila2 = jTable2.getSelectedRow();
}
}
private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int valor = JOptionPane.showConfirmDialog(null,"¿Deseas confirmar Gastos?");
if(JOptionPane.OK_OPTION == valor)
{
guardarDatosMedicamentos();
guardarProductosFisicos();
guardarInformacionFinal();
dispose();
}
}
private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
guardarProductosFisicos();
}
private void jbnActualizarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
ListaProgramacion listaProgramacion = new ListaProgramacion();
int fils = defaultTableModel1.getRowCount();
for(int i = 0; i < fils;i++)
{
listaProgramacion.buscarproducto(consecutivo,defaultTableModel1.getValueAt(i,0),
defaultTableModel1.getValueAt(i,2), defaultTableModel1.getValueAt(i,3),
defaultTableModel1.getValueAt(i,4));
}
consultarTableMedicamento();
listaProgramacion.cambioEstadoPaciente(4, consecutivo);
}
private void jbActualizarFisicoActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
ListaProgramacion listaProgramacion = new ListaProgramacion();
int fils = defaultTableModel2.getRowCount();
for(int i = 0; i < fils;i++)
{
listaProgramacion.buscarproductoFisico(consecutivo,defaultTableModel2.getValueAt(i,0),
defaultTableModel2.getValueAt(i,2), defaultTableModel2.getValueAt(i,3),
defaultTableModel2.getValueAt(i,4));
}
consultarTablaFisico();
listaProgramacion.cambioEstadoPaciente(4, consecutivo);
}
public void llenarCampos()
{
//Este llena todos los campos de texto relacionados con el paciente
ListaProgramacion listaProgramacion = new ListaProgramacion();
registropaciente = listaProgramacion.seleccionarProgramacionPaciente(consecutivo);
int numeroEntradas = registropaciente.size();
//verifica que si haya informacion en el arreglo de datos.
if(numeroEntradas != 0)
{
indiceEntradaActual = 0;
listaProgramacion = registropaciente.get(indiceEntradaActual);
txtIdentificacion.setText(""+listaProgramacion.getPACNUMDOC());
txtNombre.setText(""+listaProgramacion.getNombrePac());
txtSala.setText(""+listaProgramacion.getSala());
txtDate.setText(""+listaProgramacion.getFecha());
txtcodProce.setText(""+listaProgramacion.getSIPCODIGO());
txtnomProce.setText(""+listaProgramacion.getNomProcedi());
txtEstado.setText(""+listaProgramacion.getEstado());
txtMedico.setText(""+listaProgramacion.getMEDICO());
String ide = listaProgramacion.getPACNUMDOC();
txtIngreso.setText(""+listaProgramacion.consultaIngreso(ide));
}
}
//este metodo llena la tabla de medicamentos
public void llenarTablaMedicamento()
{
ListaProgramacion lista = new ListaProgramacion();
int numeroEntradas = 0;
defaultTableModel1 = (DefaultTableModel) jTable1.getModel();
int filas = defaultTableModel1.getRowCount();
for(int i = 0;filas > i;i++)
{
defaultTableModel1.removeRow(0);
}
datos = null;
datos = lista.seleccionarProducto(this.consecutivo);
numeroEntradas = datos.size();
if(numeroEntradas != 0)
{
for(int i = 0;i < numeroEntradas;i++)
{
Object[] registros = datos.get(i);
defaultTableModel1.addRow(registros);
}
}
}
public void consultarTableMedicamento()
{
ListaProgramacion lista = new ListaProgramacion();
int numeroEntradas = 0;
ArrayList<Object[]> datos;
defaultTableModel1 = (DefaultTableModel) jTable1.getModel();
int filas = defaultTableModel1.getRowCount();
for(int i = 0;filas > i;i++)
{
defaultTableModel1.removeRow(0);
}
datos = null;
datos = lista.seleccionarProductoUtilizados(this.consecutivo);
numeroEntradas = datos.size();
if(numeroEntradas != 0)
{
for(int i = 0;i < numeroEntradas;i++)
{
Object[] registros = datos.get(i);
defaultTableModel1.addRow(registros);
}
}
}
//este metodo llena la tabla de productos fisicos
public void llenarTablaFisico()
{
ListaProgramacion lista = new ListaProgramacion();
int numeroEntradas = 0;
defaultTableModel2 = (DefaultTableModel) jTable2.getModel();
int filas = defaultTableModel2.getRowCount();
for(int i = 0;filas > i;i++)
{
defaultTableModel2.removeRow(0);
}
datos = null;
datos =lista.seleccionarRecursoFisico(this.consecutivo);
numeroEntradas = datos.size();
if(numeroEntradas != 0)
{
for(int i = 0;i < numeroEntradas;i++)
{
Object[] registros = datos.get(i);
defaultTableModel2.addRow(registros);
}
}
}
public void consultarTablaFisico()
{
ListaProgramacion lista = new ListaProgramacion();
int numeroEntradas = 0;
ArrayList<Object[]> datos;
defaultTableModel2 = (DefaultTableModel) jTable2.getModel();
int filas = defaultTableModel2.getRowCount();
for(int i = 0;filas > i;i++)
{
defaultTableModel2.removeRow(0);
}
datos = null;
datos =lista.selecRecFisUtilizado(this.consecutivo);
numeroEntradas = datos.size();
if(numeroEntradas != 0)
{
for(int i = 0;i < numeroEntradas;i++)
{
Object[] registros = datos.get(i);
defaultTableModel2.addRow(registros);
}
}
}
//este metodo muestra el consecutivo del paciente seleccionado
public void filaSele()
{
fila = jTable1.getSelectedRow();
if(fila != -1)
{
int indiceModelo = jTable1.convertRowIndexToModel(fila);
Object[] filaseleccionada = {
defaultTableModel1.getValueAt(indiceModelo, 0)
};
for(int i = 0;i < filaseleccionada.length;i++)
{
consecutivoReg = (String)filaseleccionada[i];
}
}
}
private void guardarDatosMedicamentos()
{
int respuesta = 0;
ListaProgramacion listaProgramacion = new ListaProgramacion();
int cols = defaultTableModel1.getColumnCount();
int fils = defaultTableModel1.getRowCount();
listaProgramacion.eliminarMedicamentos(consecutivo);
listaProgramacion.cambioEstadoPaciente(4,consecutivo);
for(int i = 0; i < fils; i++)
{
respuesta = listaProgramacion.guardarMedicamento(consecutivo,defaultTableModel1.getValueAt(i,0),
defaultTableModel1.getValueAt(i,2), defaultTableModel1.getValueAt(i,3),
defaultTableModel1.getValueAt(i,4));
}
if(respuesta != 0)
{
JOptionPane.showMessageDialog(null,"Medicamentos e insumos guardados satisfactoriamente","Productos Guardados",JOptionPane.INFORMATION_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(null,"No es posible guardar o no hay Medicamentos e insumos registrados","No se guardo la información",JOptionPane.ERROR_MESSAGE);
}
}
private void guardarProductosFisicos()
{
int respuesta = 0;
TableModel tableModel = jTable2.getModel();
ListaProgramacion listaProgramacion = new ListaProgramacion();
int cols = tableModel.getColumnCount();
int fils = tableModel.getRowCount();
listaProgramacion.eliminarFisicos(consecutivo);
listaProgramacion.cambioEstadoPaciente(4, consecutivo);
for(int i = 0; i < fils; i++)
{
respuesta = listaProgramacion.guardarProductoFisico(consecutivo,tableModel.getValueAt(i,0),
tableModel.getValueAt(i,2), tableModel.getValueAt(i,3), tableModel.getValueAt(i,4));
}
if(respuesta != 0)
{
JOptionPane.showMessageDialog(null,"Productos guardados satisfactoriamente","Productos Guardados",JOptionPane.INFORMATION_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(null,"No es posible guardar o no hay paquetes quirurgicos registrados","",JOptionPane.ERROR_MESSAGE);
}
}
private void guardarInformacionFinal()
{
if(txtIngreso.getText().equals(""))
{
JOptionPane.showMessageDialog(null,"El paciente no tiene ingreso activo","Ingreso no valido",JOptionPane.ERROR_MESSAGE);
}
else
{
ListaProgramacion listaProgramacion = new ListaProgramacion();
listaProgramacion.cambioEstadoPaciente(1,consecutivo);
int resultado = listaProgramacion.guardaInformacionFinal(consecutivo,txtIdentificacion.getText(),
txtIngreso.getText(),txtSala.getText(),txtcodProce.getText(),txtMedico.getText());
if(resultado != 0)
{
JOptionPane.showMessageDialog(null,"Se confirmaron los gastos,"
+ " se guardo la información y se genero suministro automatico");
}
}
}
public class SpinnerEditor extends DefaultCellEditor
{
JSpinner spinner;
JSpinner.DefaultEditor editor;
JTextField textField;
boolean valueSet;
SpinnerNumberModel snm = new SpinnerNumberModel(0,0,null, 1);
//se inicializa el spinner
public SpinnerEditor() {
super(new JTextField());
spinner = new JSpinner(snm);
editor = ((JSpinner.DefaultEditor)spinner.getEditor());
textField = editor.getTextField();
textField.addFocusListener( new FocusListener()
{
public void focusGained( FocusEvent fe )
{
System.out.println("Focus ganado");
SwingUtilities.invokeLater( new Runnable()
{
public void run() {
if ( valueSet ) {
textField.setCaretPosition(1);
}
}
});
}
public void focusLost( FocusEvent fe )
{
}
});
textField.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent ae ) {
stopCellEditing();
}
});
spinner.addChangeListener(new ChangeListener()
{
public void stateChanged(ChangeEvent e)
{
cambiarDatoCelda();
}
});
}
// Prepares the spinner component and returns it.
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
{
if ( !valueSet )
{
spinner.setValue(value);
}
SwingUtilities.invokeLater( new Runnable()
{
public void run()
{
textField.requestFocus();
}
});
return spinner;
}
public boolean isCellEditable( EventObject eo ) {
//System.err.println("isCellEditable");
if ( eo instanceof KeyEvent ) {
KeyEvent ke = (KeyEvent)eo;
System.err.println("key event: "+ke.getKeyChar());
textField.setText(String.valueOf(ke.getKeyChar()));
//textField.select(1,1);
//textField.setCaretPosition(1);
//textField.moveCaretPosition(1);
valueSet = true;
} else {
valueSet = false;
}
return true;
}
// Returns the spinners current value.
public Object getCellEditorValue()
{
return spinner.getValue();
}
public boolean stopCellEditing()
{
cantidad = Integer.parseInt(textField.getText());
cambiarDatoCelda();
//System.err.println("Stopping edit");
try {
editor.commitEdit();
spinner.commitEdit();
} catch ( java.text.ParseException e ) {
JOptionPane.showMessageDialog(null,
"Valor invalido, descartando.");
}
return super.stopCellEditing();
}
public int getValor()
{
return cantidad;
}
}
//inserta una fila en la tabla de medicamentos e insumos
public void insertarFila(String cod,String nom,int cant)
{
Object[] produ = {cod,nom,cant,0,cant};
defaultTableModel1.addRow(produ);
}
//inserta una fila en la tabla de productos fisico
public void insertarFilaPaq(String cod,String nom,int cant)
{
Object[] produ = {cod,nom,cant,0,cant};
defaultTableModel2.addRow(produ);
}
//se actualiza la columna de devolucion cuando es cambiado el valor del spinner
public void cambiarDatoCelda()
{
int fila = jTable1.getSelectedRow();
columna = 3;//jTable1.getSelectedColumn();
cantentregada = (int)jTable1.getValueAt(fila, columna - 1);
cantUtilizada = (int) jTable1.getValueAt(fila, columna);
devolucion = cantentregada - cantidad;
//si la cantidad de un determinado producto es mayor a la entregada entonces el este pone la cantidad entregada inicial.
if(devolucion < 0)
{
jTable1.setValueAt(0, fila, columna + 1 );
jTable1.setValueAt(cantentregada, fila, columna);
JOptionPane.showMessageDialog(null,jTable1.getValueAt(fila, columna));
}
else
{
jTable1.setValueAt(devolucion, fila, columna + 1);
}
}
//se actualiza la columna de devolucion cuando es cambiado el valor del spinner
public void cambiarDatoCelda2()
{
int fila = jTable2.getSelectedRow();
int columna = 3;//jTable2.getSelectedColumn();
int cantentre2 = (int)jTable2.getValueAt(fila, columna - 1);
int cantUtiliza = (int) jTable2.getValueAt(fila, columna);
devolucion = cantentre2 - cantidad2;
if(devolucion < 0)
{
jTable2.setValueAt(cantentre2, fila, columna);
jTable2.setValueAt(0, fila, columna + 1 );
}
else
{
jTable2.setValueAt(devolucion, fila, columna + 1);
}
}
//este metodo valida el rol y habilita o desabilita los componentes deacuerdo al rol.
public void validarAcceso()
{
SeguridadAceso seguridadAceso = new SeguridadAceso(codigoUsuario);
int rol = seguridadAceso.rol();
if(rol == 5)
{
jbnAgregraMed.setEnabled(false);
jbnQuitarMed.setEnabled(false);
jbnActualizar.setEnabled(false);
jbtnGrabaMed.setEnabled(false);
jButton1.setEnabled(false);
jButton2.setEnabled(false);
jButton12.setEnabled(false);
jButton4.setEnabled(false);
jTabbedPane2.remove(jTabbedPane2.indexOfTab("Paquete Quirurgico"));
jTable2.setEnabled(false);
jTable1.setEnabled(false);
}
else if(rol == 10)
{
jButton3.setEnabled(false);
jbnQuitarFis.setEnabled(false);
jbActualizarFisico.setEnabled(false);
jButton14.setEnabled(false);
jButton1.setEnabled(false);
jButton2.setEnabled(false);
jButton12.setEnabled(false);
jButton4.setEnabled(false);
jTabbedPane2.remove(jTabbedPane2.indexOfTab("Medicamentos e insumos"));
jTable2.setEnabled(false);
}
else if(rol == 15)
{
jbnAgregraMed.setEnabled(false);
jbnQuitarMed.setEnabled(false);
jButton3.setEnabled(false);
jbnQuitarFis.setEnabled(false);
jButton4.setEnabled(false);
}
else if(rol == 35)
{
jButton2.setEnabled(false);
jbtnGrabaMed.setEnabled(false);
jbnActualizar.setEnabled(false);
jbActualizarFisico.setEnabled(false);
jButton14.setEnabled(false);
}
else
{
jbnAgregraMed.setEnabled(false);
jbnQuitarMed.setEnabled(false);
jbtnGrabaMed.setEnabled(false);
jButton1.setEnabled(false);
jButton2.setEnabled(false);
jButton3.setEnabled(false);
jbnQuitarFis.setEnabled(false);
jButton14.setEnabled(false);
jButton12.setEnabled(false);
jButton4.setEnabled(false);
jTabbedPane2.setEnabledAt(0,false);
jTabbedPane2.setEnabledAt(1,false);
jTabbedPane2.setEnabledAt(2,false);
jTable1.setEnabled(false);
}
}
//se actualiza la columna de devolucion cuando es cambiado el valor del spinner
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton10;
private javax.swing.JButton jButton12;
private javax.swing.JButton jButton13;
private javax.swing.JButton jButton14;
private javax.swing.JButton jButton15;
private javax.swing.JButton jButton16;
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.JButton jButton9;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
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.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane4;
private javax.swing.JTabbedPane jTabbedPane2;
private javax.swing.JTable jTable1;
private javax.swing.JTable jTable2;
private javax.swing.JTable jTable3;
private javax.swing.JTextField jTextField1;
private javax.swing.JButton jbActualizarFisico;
private javax.swing.JButton jbnActualizar;
private javax.swing.JButton jbnAgregraMed;
private javax.swing.JButton jbnQuitarFis;
private javax.swing.JButton jbnQuitarMed;
private javax.swing.JButton jbtnGrabaMed;
private javax.swing.JLabel lblIdentificacion;
private javax.swing.JLabel lblIdentificacion1;
private javax.swing.JLabel lblIdentificacion2;
private javax.swing.JLabel lblIdentificacion3;
private javax.swing.JLabel lblIdentificacion6;
private javax.swing.JLabel lblNombre;
private javax.swing.JLabel lblNombre1;
private javax.swing.JLabel lblNombre2;
private javax.swing.JLabel lblNombre3;
private javax.swing.JTextField txtDate;
private javax.swing.JTextField txtEstado;
private javax.swing.JTextField txtFiltro;
private javax.swing.JTextField txtFiltro1;
private javax.swing.JTextField txtFiltro2;
private javax.swing.JTextField txtIdentificacion;
private javax.swing.JTextField txtIngreso;
private javax.swing.JTextField txtMedico;
private javax.swing.JTextField txtNombre;
private javax.swing.JTextField txtSala;
private javax.swing.JTextField txtcodProce;
private javax.swing.JTextField txtnomProce;
// End of variables declaration
}