|
文本编辑器源文件(java语言)(18) test.rep(); return true; } return super.action(evt,arg); } }
class W_quit extends Dialog { Button OK,Cancel; I_Method im;
public W_quit(Frame fr,I_Method qm) { super(fr,"Java文本编译器"); //setBackground(Color.lightGray); setFont(new Font("TimesRoman",Font.BOLD,16)); im= qm; OK= new Button("确定"); Cancel= new Button("取消");
Panel pp= new Panel(); pp.add(OK); pp.add(Cancel); add("South",pp); add("Center",new Label("Ready to Quit",1)); reshape(100,100,200,100); }
public boolean action(Event evt,Object arg) { if(evt.target== OK) { im.setQuit(); dispose(); return true; }else if(evt.target== Cancel) {
|