/*
* Scrabaid
*
* Revisions:
*
* 18/05/2001 lc - v1.0 release
*
* ----------------------------------------------------------------------------
*
* Scrabaid version 1.0, Copyright 2001 Linus Chang
* Scrabaid comes with ABSOLUTELY NO WARRANTY; for details, view the LICENCE
* file included with this distribution. This is free software, and you are
* welcome to redistribute it under certain conditions; view the LICENCE
* file for details.
*/

import java.awt.*;
import java.awt.event.*;

class ScrabaidHeading extends Canvas {
	ScrabaidHeading() {
		setSize(340,100);
	}
	private void centerText(Graphics g, String s, int y, Font f, Color c) {
		g.setFont(f);
		g.setColor(c);
		FontMetrics fm = g.getFontMetrics();
		Dimension d = getSize();
		g.drawString(s, (d.width - fm.stringWidth(s)) / 2, y);
	}
	public void paint(Graphics g) {
		Font f = new Font("SansSerif", Font.BOLD, 40);
		centerText(g, "Scrabaid", 40, f, new Color(0.1f, 0.4f, 0.1f));
		f = new Font("SansSerif", Font.ITALIC, 24);
		centerText(g, "The essential Scrabble aid", 70, f, new Color(0.2f,0.3f,1.0f));
		f = new Font("SansSerif", Font.ITALIC, 14);
		centerText(g, "Copyright 2001 Linus Chang. Released under GPL.", 90, f, Color.black);
	}
}



