Example usage for javafx.print PrinterJob jobStatusProperty

List of usage examples for javafx.print PrinterJob jobStatusProperty

Introduction

In this page you can find the example usage for javafx.print PrinterJob jobStatusProperty.

Prototype

public ReadOnlyObjectProperty<JobStatus> jobStatusProperty() 

Source Link

Document

A read only object property representing the current JobStatus

Usage

From source file:Main.java

private void print(Node node) {
    System.out.println("Creating a printer job...");

    PrinterJob job = PrinterJob.createPrinterJob();
    if (job != null) {
        System.out.println(job.jobStatusProperty().asString());

        boolean printed = job.printPage(node);
        if (printed) {
            job.endJob();/*  w ww .  j  a  v a2  s  . co  m*/
        } else {
            System.out.println("Printing failed.");
        }
    } else {
        System.out.println("Could not create a printer job.");
    }
}