下面是生成一个依赖窗口的对话框,属性为modal,请把所缺的代码补齐。 import java.awt.*; public class DialogDemo extends Frame {DialogDemo ( ){ SetTitle ("Demo"); Panel p=new Panel(); p.add(new label ("one")); p.add(new Checkbox("two")); add ("North",p); add ("Center", new TextArea ("three", 3,10)); Dialog d=new Dialog(this,"a cat", 【12】 ); d.add("North",new Label ("Modal dialog"); d.add("Center",new TextArea("hello"); d.pack (); d.show();}public static void main(String args[] ){ DialogDemo f=new DialogDemo(); f.pack(); f.show ();} }