private void createAndShowTipWindow(final MouseEvent e, final String text) {

		Window owner = SwingUtilities.getWindowAncestor(textArea);
		tipWindow = new TipWindow(owner, this, text);
		tipWindow.setHyperlinkListener(hyperlinkListener);

		// Give apps a chance to decorate us with drop shadows, etc.
		PopupWindowDecorator decorator = PopupWindowDecorator.get();
		if (decorator!=null) {
			decorator.decorate(tipWindow);
		}

		// TODO: Position tip window better (handle RTL, edges of screen, etc.).
		// Wrap in an invokeLater() to work around a JEditorPane issue where it
		// doesn't return its proper preferred size until after it is displayed.
		// See http://forums.sun.com/thread.jspa?forumID=57&threadID=574810
		// for a discussion.
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {

				// If a new FocusableTip is requested while another one is
				// *focused* and visible, the focused tip (i.e. "tipWindow")
				// will be disposed of.  If this Runnable is run after the
				// dispose(), tipWindow will be null.  All of this is done on
				// the EDT so no synchronization should be necessary.
				if (tipWindow==null) {
					return;
				}

				tipWindow.fixSize();
				ComponentOrientation o = textArea.getComponentOrientation();

				Point p = e.getPoint();
				SwingUtilities.convertPointToScreen(p, textArea);

				// Ensure tool tip is in the window bounds.
				// Multi-monitor support - make sure the completion window (and
				// description window, if applicable) both fit in the same
				// window in a multi-monitor environment.  To do this, we decide
				// which monitor the rectangle "p" is in, and use that one.
				Rectangle sb = TipUtil.getScreenBoundsForPoint(p.x, p.y);
				//Dimension ss = tipWindow.getToolkit().getScreenSize();

				// Try putting our stuff "below" the mouse first.
				int y = p.y + Y_MARGIN;
				if (y+tipWindow.getHeight()>=sb.y+sb.height) {
					y = p.y - Y_MARGIN - tipWindow.getHeight();
				}

				// Get x-coordinate of completions.  Try to align left edge
				// with the mouse first (with a slight margin).
				int x = p.x - X_MARGIN; // ltr
				if (!o.isLeftToRight()) {
					x = p.x - tipWindow.getWidth() + X_MARGIN;
				}
				if (x<sb.x) {
					x = sb.x;
				}
				else if (x+tipWindow.getWidth()>sb.x+sb.width) { // completions don't fit
					x = sb.x + sb.width - tipWindow.getWidth();
				}

				tipWindow.setLocation(x, y);
				tipWindow.setVisible(true);

				computeTipVisibleBounds(); // Do after tip is visible
				textAreaListener.install(textArea);
				lastText = text;

			}
		});

	}