Netbeans Visual Library Tip0: Printing a scene

The Visual Library itself provides support for printing via the ScenePrinter class, located in org.netbeans.api.visual.print.

The ScenePrinter provides a couple of convenience methods for printing, the simplest only takes one argument, the scene you want to print.

ScenePrinter.print(Scene scene);

thats it, when called, this would show the default printing dialoge. But besides just printing the scene like that, you can set a few settings like page orientation or scaling,  check out the javadoc here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: