I write you because I can't print with swt library.
I have a Shell with some elements I'd like to print all contents in the shell (like a printscreen). I find some examples, but at the moment I print a white paper.
the code that I insert in the click-event of a button is:
PrintDialog printDialog = new PrintDialog(shell); // "shell" is the most bigger object that contain all the items I'd like to print
PrinterData printerData = printDialog.open();
Printer printer = new Printer(printerData);
GC gc = new GC(printer);