Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

canvas zoom

895794Mar 9 2012 — edited Mar 14 2012
I have a scene filled with a canvas (a direct subclass of Pane).
Initially the canvas is full of the scene.

After set the scale of the canvas (zoom), I noticed the bounds of the canvas has changed. How can I always keep the canvas full of the scene? (always means: after zoom and pan)

The solution in Swing was relative strait forward: just override the paintComp() method.
In JFX2 however I cannot find any paint(). I am afraid the SceneGraph-based design is a little different.

I have tried several solutions, no success however. Any ideas?

Thanks

Edited by: user5414764 on Mar 9, 2012 2:34 AM

Edited by: user5414764 on Mar 9, 2012 3:41 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 11 2012
Added on Mar 9 2012
8 comments
1,337 views