How do i settitle of this appletform? I am trying to add menuitems in my applet with no luck yet! and how to close the window if close menuitem is clicked? I tried dispose(); but its also not working!
public class AppletForm extends Applet implements
DragGestureListener, // For recognizing the start of drags
DragSourceListener, // For processing drag source events
DropTargetListener, // For processing drop target events
MouseListener, // For processing mouse clicks
MouseMotionListener // For processing mouse drags
{
private MenuBar menuBar = new MenuBar(); // first, create a MenuBar item
private Menu file = new Menu(); // our File menu
// what's going in File? let's see...
private MenuItem openFile = new MenuItem(); // an open option
private MenuItem saveFile = new MenuItem(); // a save option
private MenuItem close = new MenuItem(); // and a close option!
StringBuffer strBuffer;
public void init() {
setSize(500, 300);
addMouseListener(this);
strBuffer = new StringBuffer();
addItem("initializing the apple ");
}
}