setTitle ("This is my Frame");
setBackground (Color.lightGray);
//Create a toolbar Panel object and add the buttons
Panel panToolbar = new Panel ();
panToolbar.setLayout (new FlowLayout (FlowLayout.LEFT));
btnClose = new Button ("Close");
btnOk = new Button ("OK");
panToolbar.add ( btnClose );
panToolbar.add ( btnOk );
add ( panToolbar, "North");
add (new EtchedLabel (), "Center" );
addWindowListener (this);
btnClose.addActionListener (this);
btnOk.addActionListener (this);