@Override
	public void paint(Graphics g1) {
		Graphics2D g = (Graphics2D) g1;
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
		Rectangle[] rects = buildHeaders();

		g.setColor(TEXT_COLOR);
		String topLine = Script.getName() + " by Strikeskids";
		String botLine = (Universal.testing ? "00:00:00 STATUS" : Time.format(Script.getElapsed()) + " "
				+ Script.getStatus());

		Point headerLoc = new Point(rects[0].getLocation());
		headerLoc.translate(tabHeader.width+spacing,0);
		
		TextUtil.drawTextFromPoint(g, headerLoc, topLine + "\n" + botLine, Anchor.TOP_LEFT);

		int loc = -1;
		for (PaintTab tab : tabs) {

			Rectangle head = rects[++loc + 1];

			if (loc == curTab) {
				g.setPaint(BACKGROUND);
				g.fill(getTabBackground(loc));

				Rectangle main = getMainRect(loc);

				Graphics2D tmp = (Graphics2D) g1.create(main.x, main.y, main.width, main.height);
				tmp.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
				tab.paint(tmp);
				tmp.dispose();
			} else {
				g.setPaint(UNSELECTED_BACKGROUND);
				g.fill(head);
			}

			BufferedImage img = tab.getImage();
			if (img == null)
				img = defaultImage;

			g.drawImage(img, head.x + (tabHeader.width - tabHeaderImage.width) / 2, head.y
					+ (tabHeader.height - tabHeaderImage.height) / 2, tabHeaderImage.width, tabHeaderImage.height,
					null);
		}
	}