I know canvas for swing and javafx are diferent things, but for swing I used to do something like
MyCanvas extends Canvas
{ Thread t;// and all that it comes after
@override
run()
{
render & update here
}
}//canvas
then u add that canvas to the JFrame, and set Jframe size, etc, after that u can show your game in the windows ( JFrame ) screen,
but for JavaFx canvas you have to get the context, like htm5 javascript games, then
can I extends JavaFx canvas and add a thread inside and just add to stage?