private void print() {
        if ( ( getCurrentTreePanel() == null ) || ( getCurrentTreePanel().getPhylogeny() == null )
                || getCurrentTreePanel().getPhylogeny().isEmpty() ) {
            return;
        }
        if ( !getOptions().isPrintUsingActualSize() ) {
            getCurrentTreePanel().setParametersForPainting( getOptions().getPrintSizeX() - 80,
                                                            getOptions().getPrintSizeY() - 140,
                                                            true );
            getCurrentTreePanel().resetPreferredSize();
            getCurrentTreePanel().repaint();
        }
        final String job_name = Constants.PRG_NAME;
        boolean error = false;
        String printer_name = null;
        try {
            printer_name = Printer.print( getCurrentTreePanel(), job_name );
        }
        catch ( final Exception e ) {
            error = true;
            JOptionPane.showMessageDialog( this, e.getMessage(), "Printing Error", JOptionPane.ERROR_MESSAGE );
        }
        if ( !error && ( printer_name != null ) ) {
            String msg = "Printing data sent to printer";
            if ( printer_name.length() > 1 ) {
                msg += " [" + printer_name + "]";
            }
            JOptionPane.showMessageDialog( this, msg, "Printing...", JOptionPane.INFORMATION_MESSAGE );
        }
        if ( !getOptions().isPrintUsingActualSize() ) {
            getControlPanel().showWhole();
        }
    }