import java.awt.*;

public class messagebox extends Frame
{
   Panel p1;
   Panel p2;
   Label l1;
   Button b1;

   public messagebox(String mens)
   {
      setLayout(new BorderLayout());

      this.setTitle("Mensagem");
      this.reshape(200,200,410,170);

      p1 = new Panel();
      add("North",p1);
      l1 = new Label(mens);
      p1.add(l1);

      p2 = new Panel();
      add("South",p2);
      b1 = new Button("OK");
      p2.add(b1);
   }

   public boolean action(Event evt, Object arg)
   {
      if ("OK".equals(arg))
      {
         hide();
      }
      return true;
   }
}

