[单项选择题] 请在下列程序的横线处填入正确的语句。 import java.awt.*; import java.awt,event.*; public class ex16 { frame f; textarea ta; Button btn; public static void main(String[] args) { ex16 e = new ex16();e.m(); } public void m() {f = new frame("ex16");ta = new textarea();btn = new Button("ok"); btn.addActionListener(new MyAction());f.add(ta, "Center");f.add(btn, "South");f.setSize(100, 100);f.setVisible (true); } class MyAction implements ActionListener {______{ System. out.println (ta. getText ());} } }
A.static void actionPcrformcd(AcfionEvent
B.public void action(ActionEwent
C.public actionPerformed(ActionEvent
D.public void actionPerformed(ActionEvent
正确答案:D
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)