Boa Tarde meus caros...
Bom é o seguinte tenho uma tela de loggin conforme o codigo vai executando ele vai atualizando a Jlabel.
O Problema q nao modificando no layout, mas a variável esta.private void txtSenhaActionPerformed(java.awt.event.ActionEvent evt) {
bd = new BancoDeDados();
Usuario usu = new Usuario();
Usuario usur = new Usuario();
String n = null;
if (n == null) {
usu = ServicoUsuario.getInstance().consultar(txtLoggin.getText());
try {
jLabel5.setText("Carregando dados do Usuario.."); //QUANDO ELE PASSAR POR ESTA ETAPA ERA PARA INSERIR ESTA MSG.
jLabel5.repaint();
jProgressBar1.setValue(30);
jProgressBar1.repaint(); // AQUI É A MESMA COISA
Thread.sleep(1000);
} catch (InterruptedException ex) {
Logger.getLogger(Loggin.class.getName()).log(Level.SEVERE, null, ex);
}
if (usu != null) {
usur = ServicoUsuario.getInstance().consultarSenha(txtSenha.getText());
if (usur != null) {
int x = 0;
try {
jLabel5.setText("Carregando dados do Sistema.."); //QUANDO ELE PASSAR POR ESTA ETAPA ERA PARA INSERIR ESTA MSG.
jProgressBar1.setValue(60);
JjProgressBar1.repaint(); // AQUI É A MESMA COISA
Thread.sleep(1000);
} catch (InterruptedException ex) {
Logger.getLogger(Loggin.class.getName()).log(Level.SEVERE, null, ex);
}
frmTelaPrincipal = new TelaPrincipal();
jProgressBar1.setValue(100);
try {
JOptionPane.showMessageDialog(null, "Sistema Carregado com Sucesso!"); // SO ESTA MOSTRANDO ESTA QUANDO ESTA COMPLETO O CODIGO.
Thread.sleep(1000);
} catch (InterruptedException ex) {
Logger.getLogger(Loggin.class.getName()).log(Level.SEVERE, null, ex);
}
frmTelaPrincipal.setVisible(true);
this.setVisible(false);
} else {
JOptionPane.showMessageDialog(null, "Usuario não Cadastrado");
}
}
}