p.setLayout (new GridLayout (1, 2));
p.setLayout (new GridLayout (1, 3));
  public void init ()  {    text = new Label ("Dialog Test");    text.setAlignment (Label.CENTER);    add (text, "North");    text.setVisible (false);    Panel p = new PrettyPanel();    Button cb = new Button ("OK");    cb.addActionListener(new ActionListener () {      public void actionPerformed (ActionEvent e) 	{	  dispose();	}    });        p.setLayout (new GridLayout (1, 2));    ((GridLayout) p.getLayout ()).setHgap (5);    ((GridLayout) p.getLayout ()).setVgap (5);    p.add (cb);    Button toggle = new Button ("Toggle");    p.add (toggle);    toggle.addActionListener(new ActionListener () {      public void actionPerformed (ActionEvent e) 	{	  if (text.isVisible ())	    text.setVisible (false);	  else 	    text.setVisible (true);	  doLayout();	}    });        add (p, "South");    setTitle ("Dialog");    setSize (130, 70);  }