Bonsoir tous le monde
Svo j'ai une question voila :
J'arrive pas a changer l'imprimante par defaut par programmation j'ai essayé ce code mais ca marche pas :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
PrinterJob pj = PrinterJob.getPrinterJob(); 
PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null); 
for (PrintService printer : printServices) { 
  if (printer.getName().equals("la nouvelle imprimante")) { 
    try { 
      pj.setPrintService(printer); 
    } catch (PrinterException ex) { 
    } 
  } 
}
Merci beaucoup.