Problemas con el ActionPerformed

carol
01 de Octubre del 2005
Hola, estoy desarrollando una aplicación en java studio mobility y tengo un problema con el evento action preformed de un boton, ya que el mismo al darle click debe mostrar otra pantalla y cuando el programe corre ni siquiera entra en el procedimiento y no me explico porque, adjunto les envio mi codigo para que lo revisen y si me pueden ayudar se lo agradecería.

import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.*;
import java.io.*;
import java.sql.*;
import java.awt.event.*;
import java.util.Vector.*;
import symbol.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.JTable;
import javax.swing.*;
import java.awt.*;
import javax.swing.table.TableColumn;

public class LogTransacciones extends java.awt.Frame {
DefaultTableModel dtm;
//public BusquedaLogTrans busqueda;

/** Creates new form LogTransacciones */
public LogTransacciones() {
initComponents();
//setLocation(0,0);


before();
}
public void before()
{
dtm=new DefaultTableModel();
TableColumn columna=null;
columna=jtLogTrans.getColumnModel().getColumn(0);
columna.setPreferredWidth(100);
columna=jtLogTrans.getColumnModel().getColumn(1);
columna.setPreferredWidth(100);
columna=jtLogTrans.getColumnModel().getColumn(2);
columna.setPreferredWidth(100);
columna=jtLogTrans.getColumnModel().getColumn(3);
columna.setPreferredWidth(100);
columna=jtLogTrans.getColumnModel().getColumn(4);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(5);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(6);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(7);
columna.setPreferredWidth(4000);
columna=jtLogTrans.getColumnModel().getColumn(8);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(9);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(10);
columna.setPreferredWidth(300);

/*TableColumn column = null;
for (int i = 0; i < 11; i++) {
column = jtLogTrans.getColumnModel().getColumn(i);
if (i == 2) {
column.setPreferredWidth(30); //sport column is bigger
} else {
column.setPreferredWidth(50);
}
if (i == 6) {
column.setPreferredWidth(200); //sport column is bigger
} else {
column.setPreferredWidth(50);
}
if (i == 7) {
column.setPreferredWidth(2000); //sport column is bigger
} else {
column.setPreferredWidth(50);
}
if (i == 9) {
column.setPreferredWidth(200); //sport column is bigger
} else {
column.setPreferredWidth(50);
}
if (i == 10) {
column.setPreferredWidth(2000); //sport column is bigger
} else {
column.setPreferredWidth(50);
}
}*/

}

public void cargar_dtm(ResultSet resul)
{
dtm.addColumn("Oracle Sid");
dtm.addColumn("Extproc Pid");
dtm.addColumn("Usuario");
dtm.addColumn("Sociedad");
dtm.addColumn("Fecha y Hora Inicio Proceso");
dtm.addColumn("Fecha y Hora Fin Proceso");
dtm.addColumn("Tipo de Transacción");
dtm.addColumn("Texto de Control");
dtm.addColumn("Número de Transacción");
dtm.addColumn("Clase Movimiento");
dtm.addColumn("Resultado");


try{
while(resul.next()) {
Vector Vec=new Vector();
Vec.add(""+resul.getInt("oracle_sid"));
Vec.add(""+resul.getInt("extproc_pid"));
Vec.add(resul.getString("usuario"));
Vec.add(resul.getString("sociedad"));
Vec.add(resul.getString("fecha_hora_proceso"));
Vec.add(resul.getString("fecha_fin_proceso"));
Vec.add(resul.getString("tipo_transaccion"));
Vec.add(resul.getString("texto_control"));
Vec.add(""+resul.getInt("nro_trans"));
Vec.add(resul.getString("clase_movimiento"));
Vec.add(resul.getString("texto_resultado"));
System.out.println(Vec);
dtm.addRow(Vec);
jtLogTrans.updateUI();

}
}
catch (Exception e) {
e.printStackTrace();

}
jtLogTrans.setModel(dtm);
TableColumn columna=null;
columna=jtLogTrans.getColumnModel().getColumn(0);
columna.setPreferredWidth(100);
columna=jtLogTrans.getColumnModel().getColumn(1);
columna.setPreferredWidth(100);
columna=jtLogTrans.getColumnModel().getColumn(2);
columna.setPreferredWidth(100);
columna=jtLogTrans.getColumnModel().getColumn(3);
columna.setPreferredWidth(100);
columna=jtLogTrans.getColumnModel().getColumn(4);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(5);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(6);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(7);
columna.setPreferredWidth(4000);
columna=jtLogTrans.getColumnModel().getColumn(8);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(9);
columna.setPreferredWidth(200);
columna=jtLogTrans.getColumnModel().getColumn(10);
columna.setPreferredWidth(300);
//jtLogTrans.add(jspTable);

}

/*public void actualizar()
{
jtLogTrans.updateUI();
}*/

/** 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.
*/
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;

jpButtons = new javax.swing.JPanel();
bNvaBusqueda = new javax.swing.JButton();
bExcel = new javax.swing.JButton();
jspTable = new javax.swing.JScrollPane();
jtLogTrans = new javax.swing.JTable();

setLayout(new java.awt.GridBagLayout());

setBackground(new java.awt.Color(153, 204, 255));
addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseDragged(java.awt.event.MouseEvent evt) {
Evento(evt);
}
});
addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
EventoBus(evt);
}
});
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});

jpButtons.setLayout(new java.awt.GridBagLayout());

jpButtons.setBackground(new java.awt.Color(153, 204, 255));
bNvaBusqueda.setIcon(new javax.swing.ImageIcon("C:\Documents and Settings\Administrador\Mis documentos\Mis imágenes\bBusqueda3.gif"));
bNvaBusqueda.setToolTipText("Nueva Busqueda");
bNvaBusqueda.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bNvaBusquedaActionPerformed(evt);
}
});
bNvaBusqueda.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
bNvaBusquedaMouseClicked(evt);
}
});

gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.ipady = 2;
gridBagConstraints.insets = new java.awt.Insets(3, 6, 3, 23);
jpButtons.add(bNvaBusqueda, gridBagConstraints);

bExcel.setIcon(new javax.swing.ImageIcon("C:\Documents and Settings\Administrador\Mis documentos\Mis imágenes\icon-xls.png"));
bExcel.setToolTipText("Enviar a Excel");
bExcel.setPreferredSize(new java.awt.Dimension(61, 31));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 6;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.gridheight = 2;
gridBagConstraints.ipadx = 10;
gridBagConstraints.ipady = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
gridBagConstraints.insets = new java.awt.Insets(3, 3, 7, 44);
jpButtons.add(bExcel, gridBagConstraints);

gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.ipadx = 402;
gridBagConstraints.ipady = 49;
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
add(jpButtons, gridBagConstraints);

jspTable.setBackground(new java.awt.Color(153, 204, 255));
jtLogTrans.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 [] {
"Oracle Sid", "Extproc Pid", "Usuario", "Sociedad", "Fecha y Hora Inicio Proceso", "Fecha y Hora Fin Proceso", "Tipo de Transacción", "Texto de Control", "Número de Transacciones", "Clase Movimiento", "Resultado"
}
) {
boolean[] canEdit = new boolean [] {
false, false, false, false, false, false, false, false, false, false, false
};

public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
jtLogTrans.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
jtLogTrans.setEnabled(false);
jspTable.setViewportView(jtLogTrans);

gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.ipadx = 146;
gridBagConstraints.ipady = 26;
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
add(jspTable, gridBagConstraints);
jspTable.getAccessibleContext().setAccessibleName("");

pack();
}

private void bNvaBusquedaMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
BusquedaLogTrans busqueda= new BusquedaLogTrans() ;
}

private void bNvaBusquedaActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
BusquedaLogTrans busqueda= new BusquedaLogTrans() ;
}

/* private void before()
{
bNvaBusqueda.setToolTipText("");

}*/

private void EventoBus(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:

}

private void Evento(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:

}

/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
new LogTransacciones().show();
}

// Variables declaration - do not modify
private javax.swing.JButton bExcel;
private javax.swing.JButton bNvaBusqueda;
private javax.swing.JPanel jpButtons;
private javax.swing.JScrollPane jspTable;
private javax.swing.JTable jtLogTrans;
// End of variables declaration
}

De antemano gracias.