public void paintMessage(Graphics2D g, Message message) {
		switch (message.getType()) {
		case ERROR:
			g.setColor(ERROR_MESSAGE_BACKGROUND_COLOR);
			break;
		case INFO:
			g.setColor(INFO_MESSAGE_BACKGROUND_COLOR);
			break;
		default:
			g.setColor(NORMAL_MESSAGE_BACKGROUND_COLOR);
		}

		StringTokenizer tok = new StringTokenizer(message.getText(), "\n");
		int nbLines = tok.countTokens();

		int height = LINE_HEIGHT * (nbLines + 2);
		int top = (getScreen().getScreenHeight() - height) / 2;

		g.fillRect(0, top, getScreen().getScreenWidth(), height);
		Font oldFont = g.getFont();
		g.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 2 * LINE_HEIGHT / 3));
		g.setColor(MESSAGE_TEXT_COLOR);

		int y = top + 2 * LINE_HEIGHT;
		while (tok.hasMoreTokens()) {
			String line = tok.nextToken();
			GUIUtils.drawCenteredString(g, line, getScreen().getScreenWidth(),
					y);
			y += LINE_HEIGHT;
		}

		g.setFont(oldFont);
	}