JavaFX Printer get default printer
import javafx.application.Application; import javafx.collections.ObservableSet; import javafx.print.Printer; import javafx.scene.Scene; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class Main extends Application { public static void main(String[] args) { Application.launch(Main.class, args); }/*from w w w .j ava2 s. c om*/ @Override public void start(Stage primaryStage) { StackPane root = new StackPane(); final Printer selectedPrinter = Printer.getDefaultPrinter(); System.out.println(selectedPrinter.getName()); ObservableSet<Printer> set = Printer.getAllPrinters(); for(Printer p: set) { System.out.println(p.getName()); } Scene scene = new Scene(root, 400, 400); primaryStage.setTitle("Printing from JavaFX"); primaryStage.setScene(scene); primaryStage.show(); } }