import java.awt.*;

public class JWormHelpDialog extends Frame {
	public JWormHelpDialog(String title, String text) {
		super(title);
		setSize(340, 300);
		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
		setLocation((d.width - 300) / 2, (d.height - 200) / 2);
		TextArea t = new TextArea(text);
		t.setFont(new Font("Sans Serif", Font.PLAIN, 14));
		t.setEditable(false);
		add(BorderLayout.CENTER, t);
		show();
	}

	public static void showIt(String title, String text) {
		JWormHelpDialog helpDialog = new JWormHelpDialog(title, text);
	}

	public boolean handleEvent(Event evt) {
		if (evt.id == Event.WINDOW_DESTROY)
			dispose();
		return super.handleEvent(evt);
	}
}

