Back to index

wims  3.65+svn20090927
MessageWindow.java
Go to the documentation of this file.
00001 /*
00002  * Created on 26.10.2005
00003  *
00004  */
00005 package rene.zirkel.dialogs;
00006 
00007 import java.awt.BorderLayout;
00008 import java.awt.Dimension;
00009 import java.awt.Font;
00010 import java.awt.Frame;
00011 import java.awt.Point;
00012 import java.awt.Window;
00013 
00014 import rene.gui.Global;
00015 import rene.gui.MyLabel;
00016 import rene.gui.Panel3D;
00017 
00018 public class MessageWindow extends Window
00019 {      public MessageWindow (Frame f, String s)
00020        {      super(f);
00021               setBackground(Global.ControlBackground);
00022               MyLabel label=new MyLabel(s);
00023               label.setFont(new Font("Courier",Font.BOLD,16));
00024               setLayout(new BorderLayout());
00025               add("Center",new Panel3D(label));
00026               pack();
00027               Dimension d=f.getSize();
00028               Point p=f.getLocation();
00029               setLocation(p.x+d.width/2-getSize().width/2,
00030                      p.y+d.height/2-getSize().height/2);
00031        }
00032 }
00033