// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) fieldsfirst 
// Source File Name:   Tooltip.java

package lt.monarch.awt;

import java.awt.*;

// Referenced classes of package lt.monarch.awt:
//			TextLabel

public class Tooltip extends TextLabel
{

	String text;

	public Tooltip()
	{
		text = "<none>";
		setBackground(Color.yellow);
		setForeground(Color.black);
	}

	public void showTip(String s, Point point)
	{
		setText(s);
		Graphics g = getGraphics();
		g.getFontMetrics();
		resize(preferredSize());
		if(getParent().bounds().width > point.x + 10 + size().width)
			move(point.x + 10, point.y + 5);
		else
			move(point.x - size().width, point.y + 5);
		show();
	}
}
