Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to see Video When using JavaFX JFXPanel withing a JDialog

 
A Carnes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to embed a video in a JDialog box. Eventually I need to embed three seperate videos and therefore I have implemented the functionality in such a way as to define my own JFXPanel implementation for reuse. I am able to run the application and when I debug into it the createScene is being executed but I am not seeing any visible video and I am not getting any errors. I also attempted to output text and that was not visible either. I have been able to get the video I would like to embed to show in a pure JavaFX implementation so I know it is not the encoding or something. Can I please get somebody to review the following code and give me some suggestions. I am using Netbeans as an IDE if that is important. Thanks!


 
A Carnes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If no one here has any ideas on what the problem could be, could I get some suggestions on other forums or the like that I might get some help on this?

Thanks!
 
John Damien Smith
Ranch Hand
Posts: 298
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> could I get some suggestions on other forums or the like that I might get some help on this?

StackOverflow
Oracle JavaFX forum
 
John Damien Smith
Ranch Hand
Posts: 298
14
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
A Carnes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
StackPane doesn't take a MediaView in the constructor and I am not sure what the sections of code using "->" are? Is that pseudo code or something. After some fidgeting I got this example working with my media file. I am not sure what the difference is between this implementation and mine.
 
John Damien Smith
Ranch Hand
Posts: 298
14
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I am not sure what the sections of code using "->" are?

Lambda Expressions

> StackPane doesn't take a MediaView in the constructor

Depends on the version of Java you are using. StackPane an Java 8 will take accept kind of node as a constructor argument.

> I am not sure what the difference is between this implementation and mine.

I guess study the differences to see - I can't explain it to you.
For the supplied example I just used minimal Swing code to get it working.
I don't understand most of the Swing code in your example because I write very little Swing code and have little practical experience with that toolkit.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic