Im having a problem adding a javafx Canvas node to the scrollpane node. Im using the .setcontent(canvas) method of the scrollpane and there are no syntax errors. The Scrollpane does expand in width (hbar appears longer) but it still looks empty.

I know the canvas is working correctly as if i add it directly using root.getchildren.add(canvas) it appears no problem.

Does javafx have a problem adding the canvas to a scrollpane? If not could anyone provide a very simple example on how to do it. And if so do you know of any alternatives?

Javafx 2.2 is the version im using.

my bad, i was setting canvas size based on fxml values that are 0 on initialize. Just incase anyone has had a similar problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.