Button printersetup = new Button (buttonPanel, SWT.PUSH);
printersetup.setText ("Select Printer");
printersetup.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
PrintDialog dialog = new PrintDialog(getShell(), SWT.NONE);
PrinterData printerData = dialog.open ();
if (printerData != null) {
preview.setPrinterData(printerData);
preview.setPageFrame(pageFrame);
}
}