private void positionDescWindow() {

		boolean showDescWindow = descWindow!=null && ac.getShowDescWindow();
		if (!showDescWindow) {
			return;
		}

		// Don't use getLocationOnScreen() as this throws an exception if
		// window isn't visible yet, but getLocation() doesn't, and is in
		// screen coordinates!
		Point p = getLocation();
		Rectangle screenBounds = Util.getScreenBoundsForPoint(p.x, p.y);
		//Dimension screenSize = getToolkit().getScreenSize();
		//int totalH = Math.max(getHeight(), descWindow.getHeight());

		// Try to position to the right first (LTR)
		int x; 
		if (ac.getTextComponentOrientation().isLeftToRight()) {
			x = getX() + getWidth() + 5;
			if (x+descWindow.getWidth()>screenBounds.x+screenBounds.width) { // doesn't fit
				x = getX() - 5 - descWindow.getWidth();
			}
		}
		else { // RTL
			x = getX() - 5 - descWindow.getWidth();
			if (x<screenBounds.x) { // Doesn't fit
				x = getX() + getWidth() + 5;
			}
		}

		int y = getY();
		if (aboveCaret) {
			y = y + getHeight() - descWindow.getHeight();
		}

		if (x!=descWindow.getX() || y!=descWindow.getY()) { 
			descWindow.setLocation(x, y);
		}

	}