• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JLabel does not show information

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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


 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Concurrency in Swing
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic