public static void copy(final JTextArea area){
  final String selectedText=area.getSelectedText();
  if (selectedText == null) {
    ClipboardHelpers.copyToClipboard(area.getText());
  }
 else {
    ClipboardHelpers.copyToClipboard(selectedText);
  }
}

public static void copy ( final JTextArea area ) { final String selectedText = area . getSelectedText ( ) ; if ( selectedText == null ) { ClipboardHelpers . copyToClipboard ( area . getText ( ) ) ; } else { ClipboardHelpers . copyToClipboard ( selectedText ) ; } }
copies the text of the output log to the clipboard .
