Progress Bar to fast to show

how to slow things down to let the progress bar to show its progress?

here is my codes:

jProgressBar1.setValue(1);

Properties props = System.getProperties();

props.put("mail.smtp.host", "192.168.49.2");

props.put("mail.smtp.auth", "true");

Authenticator pa = new Authenticator (){

public PasswordAuthentication getPasswordAuthentication() {

return new PasswordAuthentication("bbc", "bbc");

}

};

Session session = Session.getDefaultInstance(props, pa);

jProgressBar1.setValue(15);

try{

SMTPTransport t = (SMTPTransport)session.getTransport("smtp");

jProgressBar1.setValue(31);

MimeMessage msg1 = new MimeMessage(session);

InternetAddress sendAddr = new InternetAddress("EY@cgram.com");

sendAddr.setPersonal("Eryan Yu Testing");

msg1.setFrom(sendAddr);

InternetAddress[] address = {new InternetAddress("ey@cgram.com")};

msg1.setRecipients(javax.mail.Message.RecipientType.TO, address);

msg1.setSubject("testing");

msg1.setText("smtp hello");

jProgressBar1.setValue(41);

msg1.setSentDate(new Date());

// send the message

t.connect("192.168.49.2", "ey", "ey");

jProgressBar1.setValue(61);

t.send(msg1);

jProgressBar1.setValue(100);

System.out.println(t.isConnected());

}catch (Exception e){System.out.println(e);}

thanks

[1431 byte] By [erv2] at [2007-9-30 19:29:28]
# 1
If the process is so fast you can't see the progress bar, then you don't need a progress bar.
nasch_ at 2007-7-6 23:43:30 > top of Java-index,Java Essentials,Java Programming...
# 2

try

{

Thread.sleep(5); // sleep 5 ms

}

catch (Exception e)

{

e.printStackTrace();

}

bbqfrito at 2007-7-6 23:43:30 > top of Java-index,Java Essentials,Java Programming...