Hi,
I am trying to build a Music player in Java using Jlayer Library.
Hi am using AdvancedPlayer and its play() method for playing song.
It plays the file but i does not stop until song is finished even Stop button is not pressed,window listener doesn/t works.
I am unable to solve the problem.I want to play,pause and stop song when i hit the respective button.
Thank you.
prashant1111 0
Newbie Poster
Recommended Answers
Jump to PostAny changes to the UI during run time must always be made inside a Thread.
This is really bad advice. I hope there are no tutorials on the web making this sort of suggestion. For one thing, anytime you do anything at runtime it must be inside a …
Jump to PostYou have made the very common mistake of putting a long-running process on the Swing EDT. That blocks all Swing activity until you return from your ActionPerformed, and so enabling/disabling etc doesn't get implemented in the GUI until after your ActionPerformed is finished. Moving your swing calls onto another thread …
All 8 Replies
stultuske 1,116
Posting Maven Featured Poster
Yidnekachew.
commented:
very good idea. but i dont know hhowit is +0
prashant1111 0
Newbie Poster
rajesh1158 -6
Light Poster
JamesCherrill
commented:
This information is incorrect -3
stultuske
commented:
not to mention irrelevant. -3
bguild 163
Posting Whiz
mvmalderen
commented:
Very good advice. :-) +13
stultuske 1,116
Posting Maven Featured Poster
JamesCherrill 4,733
Most Valuable Poster Team Colleague Featured Poster
rajesh1158 -6
Light Poster
JamesCherrill 4,733
Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.