aspose file tools*
The moose likes Beginning Java and the fly likes JLabel does not show information Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JLabel does not show information" Watch "JLabel does not show information" New topic
Author

JLabel does not show information

D. Formenton
Ranch Hand

Joined: Mar 20, 2008
Posts: 47
Hi,

I have the following code:

private void riceviMouseClicked(java.awt.event.MouseEvent evt) {
mp = new MailParser();
ArrayList messages;
lblStatus.setText("Inizializzazione");
messages = receiveMail(opzioni.getPopServer().getValore(),
opzioni.getEmailUser().getValore(),
opzioni.getEmailPassword().getValore());
mp.parseAndStore(messages);
}

All run OK, BUT the text "Inizializzazione" appears only when the process (of receiving mails) terminated!

Why the sequence: "before write label, after receive mail" is not respected?

What I have to do to write the label (and show it, obviously!) before the process receiveMail starts?

Thank you to all and Merry Christmas!

Domenico


Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19783
    
  20

Concurrency in Swing


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
PrasannaKumar Sathiyanantham
Ranch Hand

Joined: Nov 12, 2009
Posts: 110
the swing runs as a thread. So whatever changes you have it will respond only when the thread is invoked again. Just try swingutilities in google and you will get good examples regrading it.(what i suggested may seem vague but type it in google and read ,you will understand better)


To err is human,
To forgive is not company policy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JLabel does not show information