Java examples for 2D Graphics:Print
lookup All Printers
//package com.java2s; import javax.print.PrintService; import javax.print.PrintServiceLookup; public class Main { public static void lookupAllPrinters() { final PrintService[] printServices = PrintServiceLookup .lookupPrintServices(null, null); System.out.println("Number of print services: " + printServices.length); for (final PrintService printer : printServices) { System.out.println("Printer: " + printer.getName()); }/* w w w .j a v a 2 s . c om*/ } }