public void tblDiario_mouseClicked(MouseEvent e) { this.setCursor(AppInstance.waitCursor); Object[] row = (Object[]) this.modelDiarioVentasDeContado1.data.get(tblDiario.getSelectedRow()); frmDatosVenta.idVenta = Integer.parseInt(row[0].toString()); frmDatosVenta.ponerDatosVenta(); frmDatosVenta.setVisible(true); this.setCursor(AppInstance.defCursor); }
private void jbInit() throws Exception { setTitle("DIARIO CONTADO"); frmDatosVenta = new FrmDatosVenta(engine); frmDatosVenta.setLocationRelativeTo(this); getContentPane().setLayout(borderLayout1); jLabel1.setFont(new java.awt.Font("Arial", Font.PLAIN, 18)); jLabel1.setToolTipText(""); jLabel1.setText("DIARIO DE ENTRADAS"); pnlCentro.setLayout(borderLayout2); cmdCerrar.setText("CERRAR"); cmdCerrar.addActionListener(new FrmDiarioDeEntradas_cmdCerrar_actionAdapter(this)); cmdImprimir.setText("IMPRIMIR"); tblDiario.setBackground(new Color(255, 240, 255)); tblDiario.setFont(new java.awt.Font("Arial", Font.PLAIN, 12)); tblDiario.setModel(modelDiarioVentasDeContado1); tblDiario.addMouseListener(new FrmDiarioDeEntradas_tblDiario_mouseAdapter(this)); this.addWindowListener(new FrmDiarioDeEntradas_this_windowAdapter(this)); jLabel2.setFont(new java.awt.Font("Arial", Font.BOLD, 20)); jLabel2.setText("Total:"); lblTotal.setFont(new java.awt.Font("Arial", Font.BOLD, 20)); lblTotal.setText(""); this.getContentPane().setBackground(Color.white); this.addKeyListener(new FrmDiarioDeEntradas_this_keyAdapter(this)); pnlCentro.setBackground(Color.white); pnlNorte.setBackground(Color.white); pnlNorte.setLayout(borderLayout4); scrollDiario.getViewport().setBackground(Color.white); scrollDiario.setPreferredSize(new Dimension(800, 600)); lblFecha.setFont(new java.awt.Font("Arial", Font.BOLD, 16)); lblFecha.setText(""); jPanel1.setLayout(borderLayout3); pnlSur.setMaximumSize(new Dimension(4000, 200)); jPanel1.setBackground(Color.white); jPanel2.setBackground(Color.white); this.getContentPane().add(pnlCentro, java.awt.BorderLayout.CENTER); pnlCentro.add(pnlNorte, java.awt.BorderLayout.CENTER); pnlCentro.add(scrollDiario, java.awt.BorderLayout.NORTH); scrollDiario.getViewport().add(tblDiario); this.getContentPane().add(pnlSur, java.awt.BorderLayout.SOUTH); pnlSur.add(cmdImprimir); pnlSur.add(cmdCerrar); this.getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH); jPanel1.add(lblFecha, java.awt.BorderLayout.EAST); jPanel1.add(jLabel1, java.awt.BorderLayout.WEST); pnlNorte.add(jPanel2, java.awt.BorderLayout.EAST); jPanel2.add(jLabel2); jPanel2.add(lblTotal); this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); }