I wish to develop a program which used to play the sound file. The problem I face now is I wish can play the sound file when select the userID from mysql database.

For example, when I select one of the userID from combobox, then the sound file can automatically playing? By the way, the userId is already stored in database, just after I click one of it, then the sound file can playing directly?

Does anyone have experience in doing this kind of program?

If anyone can help me with this, I would like to say thank you to them.

I wish to develop a program which used to play the sound file. The problem I face now is I wish can play the sound file when select the userID from mysql database.

For example, when I select one of the userID from combobox, then the sound file can automatically playing? By the way, the userId is already stored in database, just after I click one of it, then the sound file can playing directly?

Does anyone have experience in doing this kind of program?

If anyone can help me with this, I would like to say thank you to them.

"The" sound file? What sound file? A different one for every user? What's in the database? User IDs with their corresponding song titles?

If so, you have three completely independent tasks...

  1. GUI interface where people can select an ID.
  2. Query ID in database to get song name.
  3. Retrieve the song and play it in Java.

Which one are you having problems with?

"The" sound file? What sound file? A different one for every user? What's in the database? User IDs with their corresponding song titles?

If so, you have three completely independent tasks...

  1. GUI interface where people can select an ID.
  2. Query ID in database to get song name.
  3. Retrieve the song and play it in Java.

Which one are you having problems with?

I have the problem in query ID in database to get the song name and retrieve the song and play it in java. So, have any suggestion on how can I do it??

Thanks.

I have the problem in query ID in database to get the song name and retrieve the song and play it in java. So, have any suggestion on how can I do it??

Thanks.

Here are the Java tutorials on database access and playing sounds:

http://java.sun.com/docs/books/tutorial/jdbc/index.html
http://java.sun.com/docs/books/tutorial/sound/index.html


I've never actually played a sound using Java. A few google searches like "java play sound", "java jdbc", "java play mp3", and "java mysql" produced some decent tutorials and links with explanations/sample code.

Ok.Thanks.. Will try and search the information again.

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.