Domanda

I've looked up multiple options for embedding a MP4 video into my GUI. I seen many people advise against using swing because it's old. I've done many GUI's with adding image icons and such but never tried embedding a MP4 video until now. Is there a simple way to embed my MP4 video into my GUI such as how Image Icons are added? Also is there a method that will keep this video on replay until the application closes? such as a video.repeat(true); or something of that nature? Thanks for all the help ahead of time.

È stato utile?

Soluzione

I don't know if/how it is possible in pure Swing, but you can embed a JavaFX MediaPlayer in your Swing application, see details here: https://stackoverflow.com/a/16326393/1149528 or here: Can't play mp4 converted file - JavaFX 2.1

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top