File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Android Security Essentials Live Lessons this week in the Android 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: 19654
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JLabel does not show information
 
Similar Threads
JLabel setText not working in actionListener
Standalone Java Client for WebSphere default Messaging.
Two Questions
Help me out in Thread
Console does not show all new print outs to console, when code changes!