Back to index

wims  3.65+svn20090927
AboutDialog.java
Go to the documentation of this file.
00001 package rene.zirkel.dialogs;
00002 
00003 // file: AboutDialog.java
00004 
00005 import java.awt.*;
00006 import java.awt.event.*;
00007 
00008 import rene.gui.*;
00009 import rene.zirkel.Zirkel;
00010 
00011 public class AboutDialog extends CloseDialog
00012 {      public AboutDialog (Frame f)
00013        {      super(f,Zirkel.name("about.title","About this Program"),true);
00014               setLayout(new BorderLayout());
00015               Panel text=new MyPanel();
00016               text.setLayout(new GridLayout(0,1));
00017               MyLabel l;
00018               text.add(l=new MyLabel(Zirkel.name("program.name")));
00019               l.setAlignment(Label.CENTER);
00020               text.add(l=new MyLabel(Zirkel.name("version")+" "+Zirkel.name("program.version")));
00021               l.setAlignment(Label.CENTER);
00022               text.add(l=new MyLabel(Zirkel.name("date")+" "+Zirkel.name("program.date")));
00023               l.setAlignment(Label.CENTER);
00024               String empty="                                         ";
00025               text.add(l=new MyLabel(empty+"***"+empty));
00026               l.setAlignment(Label.CENTER);
00027               text.add(l=new MyLabel(Zirkel.name("about.programmed","programmed by")));
00028               l.setAlignment(Label.CENTER);
00029               text.add(l=new MyLabel("R. Grothmann"));
00030               l.setAlignment(Label.CENTER);
00031               text.add(l=new MyLabel(empty+"***"+empty));
00032               l.setAlignment(Label.CENTER);
00033               text.add(l=new MyLabel(Zirkel.name("about.language")+": "
00034                      +Global.name("language","")));
00035               l.setAlignment(Label.CENTER);
00036               add("Center",new Panel3D(text));
00037               Panel p=new MyPanel();
00038               Button b=new Button(Zirkel.name("close","Close"));
00039               b.addActionListener(this);
00040               p.add(b);
00041               add("South",new Panel3D(p));
00042               addWindowListener( // to close properly
00043                      new WindowAdapter ()
00044                      {      public void windowClosing (WindowEvent e)
00045                             {      doclose();
00046                             }
00047                      }
00048               );
00049               pack();
00050               center(f);
00051               show();
00052        }
00053        public void actionPerformed (ActionEvent e)
00054        {      dispose();
00055        }
00056 }