public void drop(DropTargetDropEvent e) {
		try {
			DataFlavor stringFlavor = DataFlavor.stringFlavor;
			Transferable tr = e.getTransferable();

			if (e.isDataFlavorSupported(stringFlavor)) {
				String filename = (String) tr.getTransferData(stringFlavor);
				if (filename.endsWith(".txt") || filename.endsWith(".java")
						|| filename.endsWith(".jsp")
						|| filename.endsWith(".html")
						|| filename.endsWith(".htm")) {
					e.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
					readFile(filename);
					textPane.setCaretPosition(0);
					e.dropComplete(true);
				} else {
					e.rejectDrop();
				}
			} else {
				e.rejectDrop();
			}
		} catch (IOException ioe) {
			ioe.printStackTrace();
		} catch (UnsupportedFlavorException ufe) {
			ufe.printStackTrace();
		}
	}