File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JFrames Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrames" Watch "JFrames" New topic


Yasser Shaikh

Joined: Oct 01, 2008
Posts: 21
How to play audio files on JFrames or JPanels.
How to play video files on JFrames or JPanels.
I am trying hard to figure it out.....but all my efforts are in vain..

So Experts please help.

pete stein

Joined: Feb 23, 2007
Posts: 1561
No expert in this, but if I were wanting to do this, I'd first spend a lot of time with Google. What has it told you so far? What avenues have you explored?

Good luck
Milan Agrawal

Joined: Sep 25, 2008
Posts: 8
Hello,me Milan,a new member to this site.

I think that you need to have link with the dll files to make a audio player.

otherwise you can also search in google for the code.

thank you.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46362
And welcome to JavaRanch, Milan
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
There are a number of libraries for playing back audio and video - JMF, QuickTime for Java, jVLC, ... The page links to those.

Simple audio playback can be done using the javax.sound package. See for examples.

In the future, please give your posts better subject lines - "JFrames" is rather misleading if you ask about audio/video playback.
[ October 04, 2008: Message edited by: Ulf Dittmer ]
Rob Spoor

Joined: Oct 27, 2005
Posts: 20274

JMF also has some support for user interfaces. has methods getControlPanelComponent and getVisualComponent for controlling and showing media files. I've been able to play a small movie in Java this way.

I do think that these controls are heavyweight controls, so mixing it with Swing (lightweight controls) may lead to some unexpected results.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: JFrames
jQuery in Action, 3rd edition