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 MUSIC start, not stops 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 "MUSIC start, not stops" Watch "MUSIC start, not stops" New topic
Author

MUSIC start, not stops

sparsh khandelwal
Ranch Hand

Joined: Dec 20, 2010
Posts: 70
Hello everybody,
i try to make a program,in which i use a button "music".such that if i click it then it start playing music and on other click it stop the music.
in the given program when i click on "music" button,it start music but on other click it not stop the same.
please help!!!
thanks in advance...



[Thumbnail for program.jpg]

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

It would help if you told us which library you are using. Neither the Java SE API nor JMF has a class called AudioPlayer.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
sparsh khandelwal
Ranch Hand

Joined: Dec 20, 2010
Posts: 70
here are the libraries.......



[Thumbnail for library.jpg]

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41052
    
  43
Please drop the habit of posting screenshots that contain text - this forum software works quite well for text.


Ping & DNS - my free Android networking tools app
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Don't ever uses classes that are located in packages that start with sun, sunw or com.sun. These are undocumented and not part of the API. Oracle can drop or change these between each release of the JVM, and can therefore break any application that uses them.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: MUSIC start, not stops
 
Similar Threads
respond as early as possible ok
Can't stop a thread..
problem in using frames
Stoping multiple threads
stopping the program