eberson_oliveira, está ai todo o código da classe Telade Login
package co.departamentodetransito.visao;
import co.departamentodetransito.Controle.ControleLogin;
import co.departamentodetransito.modelo.UsuarioVO;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.SQLException;
import javax.swing.JOptionPane;
public class OuvinteTelaDeLogin {
private TelaDeLogin gui;
//Construtor
public OuvinteTelaDeLogin(TelaDeLogin gui) {
this.gui = gui;
this.gui.setOuvinteLogin( new OuvintePesquisar() );
}
public class OuvintePesquisar implements ActionListener {
public void actionPerformed(ActionEvent e) {
UsuarioVO usuario = gui.getUsuario();
ControleLogin controle = new ControleLogin();
try {
gui.setPesquisaLogin( controle.pesquisarLogin(usuario) );
}
catch (SQLException ex) {
JOptionPane.showMessageDialog(gui, ex);
//System.exit(1);
}
}
}
}
e esse é da classe InterInicializacao (todo o código):
package co.departamentodetransito.visao;
public class InterInicializacao extends javax.swing.JFrame {
TelaDeLogin telaDeLogin = null;
/** Creates new form InterInicializacao */
public InterInicializacao() {
initComponents();
this.dispose();
this.setUndecorated(true);
this.setLocationRelativeTo(null);
this.setVisible(true);
this.telaDeLogin = new TelaDeLogin();
this.telaDeLogin.setVisible(false);
for (int i = 0; i <= 100; i++) {
this.jProgressBar1.setValue(i);
try {
Thread.sleep(100);
} catch (InterruptedException ex) {
}
}
this.dispose();
this.telaDeLogin.setLocationRelativeTo(null);
this.telaDeLogin.setVisible(true);
}
public TelaDeLogin getTelaDeLogin() {
return this.telaDeLogin;
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jPanel5 = new javax.swing.JPanel();
jPanel6 = new javax.swing.JPanel();
jLabel5 = new javax.swing.JLabel();
jProgressBar1 = new javax.swing.JProgressBar();
jLabel6 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setBackground(new java.awt.Color(132, 132, 255));
setMinimumSize(new java.awt.Dimension(700, 400));
setResizable(false);
jPanel5.setBackground(new java.awt.Color(132, 132, 255));
jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(255, 255, 255), new java.awt.Color(102, 102, 102)));
jPanel5.setPreferredSize(new java.awt.Dimension(700, 400));
jPanel5.addAncestorListener(new javax.swing.event.AncestorListener() {
public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
}
public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
jPanel5AncestorAdded(evt);
}
public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
}
});
jPanel6.setBackground(new java.awt.Color(255, 255, 255));
jPanel6.setPreferredSize(new java.awt.Dimension(700, 344));
jLabel5.setText("Inicializando...");
jProgressBar1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
jProgressBar1.setDebugGraphicsOptions(jProgressBar1.getDebugGraphicsOptions());
jProgressBar1.setModel(jProgressBar1.getModel());
jProgressBar1.setPreferredSize(new java.awt.Dimension(150, 18));
jProgressBar1.setStringPainted(true);
jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/co/departamentodetransito/visao/detran.jpg"))); // NOI18N
org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel6Layout.createSequentialGroup()
.addContainerGap()
.add(jProgressBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 644, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(42, Short.MAX_VALUE))
.add(jPanel6Layout.createSequentialGroup()
.addContainerGap()
.add(jLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 141, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(545, Short.MAX_VALUE))
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel6Layout.createSequentialGroup()
.add(121, 121, 121)
.add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 473, Short.MAX_VALUE)
.add(102, 102, 102))
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel6Layout.createSequentialGroup()
.add(50, 50, 50)
.add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, Short.MAX_VALUE)
.add(18, 18, 18)
.add(jLabel5)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jProgressBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(47, 47, 47))
);
org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 696, Short.MAX_VALUE)
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel5Layout.createSequentialGroup()
.add(20, 20, 20)
.add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(32, Short.MAX_VALUE))
);
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 700, Short.MAX_VALUE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(0, 0, Short.MAX_VALUE)
.add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(0, 0, Short.MAX_VALUE)))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 400, Short.MAX_VALUE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(0, 0, Short.MAX_VALUE)
.add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(0, 0, Short.MAX_VALUE)))
);
getAccessibleContext().setAccessibleParent(this);
pack();
}// </editor-fold>
private void jPanel5AncestorAdded(javax.swing.event.AncestorEvent evt) {
}
// Variables declaration - do not modify
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private javax.swing.JProgressBar jProgressBar1;
// End of variables declaration
}
se precisar de mais alguma coisa é só pedir