public void Paste() {
		if (clipboard.isDataFlavorAvailable(DataFlavor.stringFlavor)) {
			try {
				// 取出剪切板中的内容
				String content = (String) clipboard
						.getData(DataFlavor.stringFlavor);
				if (frame.getJJTextPane().getSelectedText() != null)// 如果粘贴的时候选中了文字，则覆盖文字
				{
					frame.getJJTextPane().replaceSelection(content);
				} else// 如果没有选中文字，则插入文字
				{
					frame.getJJTextPane()
							.getDocument()
							.insertString(
									frame.getJJTextPane().getCaretPosition(),
									content, null);

				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		} else if (clipboard.isDataFlavorAvailable(DataFlavor.imageFlavor)) {
			try {
				Image img = (Image) clipboard.getData(DataFlavor.imageFlavor);
				int insert = frame.getJJTextPane().getCaretPosition();
//				 frame.getJJTextPane().insertIcon(new ImageIcon(img));
				Style imageStyle = new StyleContext().addStyle("Image", null);
				StyleConstants.setIcon(imageStyle, new ImageIcon(img));
				frame.getJJTextPane().getDocument()
						.insertString(insert, "Image", imageStyle);
			} catch (BadLocationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (UnsupportedFlavorException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}