This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 19649
    
  18

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
 
 
subject: JLabel does not show information
 
Similar Threads
Standalone Java Client for WebSphere default Messaging.
Two Questions
Help me out in Thread
JLabel setText not working in actionListener
Console does not show all new print outs to console, when code changes!