private void checkAndDrawTooltip(Graphics g) {
		Point p=new Point(mouseX,mouseY);
		if (tooltipLastPoint.equals(p)) {tooltipCtr++;} else {tooltipCtr=0;}
		if (tooltipCtr>15 && showTooltips) {
			Object o = tlBound.checkForObjectOnScreen( mouseX , mouseY );
			if (o!=null && o instanceof DisplayObject) {
				String tooltip = ( (DisplayObject) o ).checkForTooltipOnScreen(mouseX , mouseY);
				if (tooltip != null) {
					String[] lines = tooltip.split("\n");
					int width=0;
					FontMetrics fontMetrics = g.getFontMetrics(tlBound.thisFont);
					for ( int i = 0; i < lines.length; i++ ) {
						width= Math.max(width, fontMetrics.stringWidth(lines[i])+2);
					}
					int fontHeight = fontMetrics.getHeight();
					int height = fontHeight*lines.length+2;
					// int width = fontMetrics.stringWidth(tooltip)+2;
					int left = mouseX, bottom = mouseY;
					if (left+width>screenWidth) { left = screenWidth-width; }
					if (bottom-height<0) { bottom = height;}
					g.setColor( Color.darkGray );
					g.fillRect( left, bottom-height, width, height);
					g.setColor( Color.white );
					g.drawRect( left, bottom-height, width, height );
					g.setFont(tlBound.thisFont);
					for ( int i = 0; i < lines.length; i++ ) {
						g.drawString( lines[i], left+1, bottom - (lines.length-1- i)*fontHeight-1 );
					}
				}
			}
		}
		tooltipLastPoint = p;
	}