|    
			
				26/03/2008, 12:17
			
			
			  | 
  |   |  |  |  |  Fecha de Ingreso: enero-2008 Ubicación: Montevideo, Uruguay 
						Mensajes: 518
					 Antigüedad: 17 años, 9 meses Puntos: 6 |  | 
  |  Re: Doble clic en tabla  
  lo haces en el evento mouse pressed de la tabla aca te pongo un ejemplo q tengo yo
 private void tablaIngresosMousePressed(java.awt.event.MouseEven  t evt) {//GEN-FIRST:event_tablaIngresosMousePressed
 // TODO add your handling code here:
 if (evt.getClickCount() == 2) {
 Session sesion = HibernateUtil.getSessionFactory().getCurrentSessio  n();
 sesion.beginTransaction();
 Long id = (Long) tablaIngresos.getValueAt(tablaIngresos.getSelected  Row(), 0);
 Rango r = (Rango) sesion.createQuery("Select r from Rango r where r.idRango=:id").setParameter("id", id).uniqueResult();
 
 if (r != null) {
 VentanaAgregarRango v = new VentanaAgregarRango(r, true, true, this);
 v.setLocationRelativeTo(null);
 v.setVisible(true);
 }else{
 JOptionPane.showMessageDialog(null, "Debe guardar el descuento para poder modificar el rango.");
 }
 sesion.getTransaction().commit();
 }
 
 }//GEN-LAST:event_tablaIngresosMousePressed
 
 saludos
 
				__________________"La magia no existe, la programacion si" 
A/P Agustin Sivoplas [email protected]    |