Posted by jryog69
on May 12, 2008 at 4:32 PM PDT
I am attempting to return a BorderPanel using the JSR-223 Script Engine. I have a Java Class named FxScriptLauncher (see http://jfx.wikia.com/wiki/Programmatically_invoking_a_JavaFX_Script ).
I am able to recreate the example on that page, where I am able to return a FX class, but when I try and return a BorderPanel as the content for the Frame of another FX class, I does not return anything.
Here is the line when I try and bind it to the content:
content: bind (Widget) FxScriptLauncher.main("BPCloseOut_1.fx")
I think it may be an issue with me casting it as a Widget. Is casting supported in JavaFx? I am casting it because it is just returning an object. It is probably because I am trying to upcast it. Does anyone have any idea how I can fix this?