private void init()
{
f = new Frame("My TextTool");
//f.setLocation(400,300);
//f.setSize(500,400);
f.setBounds(400,300,500,400);
mb = new MenuBar();
mu = new Menu("文件");
openItem = new MenuItem("打开");
saveItem = new MenuItem("保存");
closeItem = new MenuItem("关闭");
ta = new TextArea();
mu.add(openItem);
mu.add(saveItem);
mu.add(closeItem);
mb.add(mu);
f.setMenuBar(mb);
f.add(ta);
myEvent();
f.setVisible(true);
}