Search code examples
javaswingvideojbuttonjmf

Add a video file (any format) into a JButton


Is there any way to add a video (not .gif pictures) as a background for a JButton? Or even for a JLabel?

I'm still a Java beginner so go easy on me please, I'm eager to learn :)


Solution

  • Java does not support video 'out of the box'. It would require some extra API such as JMF. Even then, it would take effort to shoehorn that video into the background of a JComponent.

    Since you are a beginner, my advice is to start with (much) simpler tasks.