• 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

Problem in play sound and set label value for same time.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all.
i used this method for my java program.
i have to problem:
first problem is when i call this method with button first i listen sound before label get any value, label haven't value till sound come to end i want to listen sound and see label value to same time.
second problem is this method just work for once and if i click on button again i don't listen any sound.
Thanks for watch and help


 
Saloon Keeper
Posts: 10705
86
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows ChatGPT
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Playing sounds is usually done inside its own thread so that the user interface doesn't freeze while the sound plays.

If a resource has an open() method, I suspect it will also have a close() method. Off hand that's the only reason I can think of at the moment as to why you can't play the sound a second time.
 
reply
    Bookmark Topic Watch Topic
  • New Topic