code: private boolean canPasteFromClipboard() {
  		try {
  			return textComponent.getTransferHandler().canImport(
  					textComponent,
  					Toolkit.getDefaultToolkit().getSystemClipboard().getContents(textComponent)
  							.getTransferDataFlavors());
  		}
  		catch (IllegalStateException e) {
  			/*
  			 * as the javadoc of Clipboard.getContents state: the
  			 * IllegalStateException can be thrown when the clipboard is not
  			 * available (i.e. in use by another application), so we return
  			 * false.
  			 */
  			return false;
  		}
  	}
docs: Try not to call this method to much as SystemClipboard#getContents()
  relatively slow.