Back to index

wims  3.65+svn20090927
Sure.java
Go to the documentation of this file.
00001 package rene.zirkel.dialogs;
00002 
00003 import java.awt.*;
00004 import rene.gui.*;
00005 import rene.dialogs.*;
00006 
00007 public class Sure extends Question
00008 {      public Sure (Frame f, String question)
00009        {      super(f,question,Global.name("sure.title"),false);
00010        }
00011        public static boolean ask (Frame f, String prompt)
00012        {      Sure s=new Sure(f,prompt);
00013               s.center(f);
00014               s.setVisible(true);
00015               return s.yes();
00016        }
00017        public static void main (String args[])
00018        {      Frame f=new CloseFrame()
00019                      {      public boolean close ()
00020                             {      return Sure.ask(this,"Close?");
00021                             }
00022                      };
00023               f.setSize(400,400);
00024               f.setLocation(100,100);
00025               f.setVisible(true);
00026        }
00027 }