package sim.util;

import java.awt.Dialog;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Label;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import sim.MainWindow;

public class WaitDialog extends Dialog {

	public WaitDialog() {
		super(MainWindow.MAIN_WINDOW, "About");
		this.setResizable(false);
		this.setLocationRelativeTo(null);

		Label l = new Label("Please Wait ...");
		l.setFont(new Font("Tahoma", Font.BOLD, 32));

		FontMetrics fm = this.getFontMetrics(l.getFont());
		this.setSize(fm.stringWidth(l.getText()), fm.getHeight());
		this.add(l);
		this.setUndecorated(true);

		this.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
			}
		});
		
		this.setVisible(false);
	}
}
