事件处理有问题!
public boolean Action (Event evt, Object arg) {
String label = (String)arg;
if (evt.target instanceof Choice) {
if (label.equals("New"))
change( );
return false;
}
return true;
}
public void change() {
Dialog dl = new Dialog( window, "Change Title", true);
dl.setLayout(new FlowLayout(FlowLayout.CENTER));
TextField tf = new TextField("fff", 25);
dl.add(tf);
dl.add(new Button("OK"));
dl.resize(200,75);
dl.show();
}
点击“New”菜单,不能弹出对话框!怎么回事?