Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sound in Swing  RSS feed

 
Rebecca Witmer
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just downloaded Eclipse and looked at the tutorials, then downloaded this plugin called SWT designer from http://www.instantiations.com/swt-designer/index.html. Now I am off and running on designing my first visual app. But I also want to play some audio in my app. Is there a Swing component you can include that looks like a media player bar, like, with a > for play and a || for pause, etc? I see lots of docs online for sound stuff, but I haven't seen anything about the visual component. Does it exist?

Also, what's the best designer plugin? Did I pick a good one?

Thanks!
Rebecca
 
Jared Cope
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The Java media framework will help you out for your media. Just do an internet search on that. You need to download it as a separate add on to your JDK. From memory it comes with the interface that you stated 'for free'.

Another alternative for only playing sounds, is a static Applet method actually. Just look in the javadoc for the Applet class. You could easily add your own buttons to control pausing, playing etc.

Hope this helps.

Cheers, Jared.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!