View Single Post
Join Date: Aug 2007
Posts: 773
Reputation: darkagn has a spectacular aura about darkagn has a spectacular aura about darkagn has a spectacular aura about 
Solved Threads: 105
darkagn's Avatar
darkagn darkagn is offline Offline
Master Poster

Re: Java program cd player need some help please

 
0
  #3
Oct 24th, 2008
Hi king000000 and welcome to DaniWeb

The play method should either:

Start playing a track if the player is not already playing;
OR
Do nothing if the player is already playing.

The stop method should either:

Stop playing the track if the player is playing;
OR
Do nothing if the player is not playing.

To do both of these methods (play and stop) you will need to maintain the state of the Player. This will involve a simple state machine - draw diagrams before you begin, it will be easier in the long run. You will need to play a Track when the state is playing and the GUI should probably display some way to inform the user that it is playing.

The setTrack method should:

Change the current track to the specified value - need another member variable for this.

These tips should give you something to go on. If you need more help, feel free to repost with another question.
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend.
Reply With Quote