On certain machines, scrolling a pane will draw some of the objects outside of the viewport. This has been documented with screenshots in StackOverflow item 15765034: http://stackoverflow.com/questions/15765034/javafx-scrollpane-showing-objects-outside-of-viewport.
I am seeing the same problem. I have seen the problem on 3 different machines, two WinXP and one Win7. I have seen the same code work correctly on several other machines. On all problematic systems, the problem went away when VM argument "-Dprism.order=j2d" was used.
Here are the object types I saw get redrawn outside the viewport...
- fillRect() done on a Canvas
- background & border regions of an AnchorPane
- background region of a StackPane
- Separator object
- Text objects
- Line objects
Not all objects get drawn outside of the viewport, but for those that do, it is almost consistent. The exception was an AnchorPane background that was not drawn when slightly outside the viewport, but then was drawn when it was further outside the viewport.
Object types that behaved correctly and did not get redrawn outside the viewport included Labels, TextFields, ChoicesBoxes, ToggleButtons, Paths, Panes, BorderPanes, VBoxes, HBoxes. I did notice there was one Button that was problematic whereas all other buttons behaved as expected.