I have been trying to bind the widthProperty and the heightProperty from Scene and Canvas to call a redraw method that has all my GraphicsContext methods inside.
OK I've updated NetBeans and JavaFX and I now have those classes. I'm not sure what redrawing is needed on resizing, unless of course your custom painting is in some way determined by the current size. Can you post a small compilable program -- a SSCCE <- link that demonstrates the problem?
I have been trying to bind the widthProperty and the heightProperty from Scene and Canvas to call a redraw method that has all my GraphicsContext methods inside.
You may need to wrap that in a Platform#invokeLater to allow all core FX code to complete first.
I figured out why I was getting a null error. First I was using the wrong method to get Scene and secondly I was calling the method before my chart was add to the scene. So this how I over came it.
I would like to use a bind method as the changelistener seams to be a little clunky.
Post by:autobot
The knights of nee want a shrubbery. And a tiny ad:
a bit of art, as a gift, that will fit in a stocking