多项选择题



程序如下:
∥Java_2. java
import java. awt. *;
import java. awt. event. * ;
public class Java_2 extends Frame
public Java_2( String s)
super(s);

public static void main( String args[ ] )
Java_2 fr=new Java_2 ("Testing");
Button b=new Button( "Please press me!");
∥********** Found ************
b. addActionListener( (3) );
fr. add(b);
fr. setSize(200,200);
fr. addWindowListener( new WindowAdapter( )
public void windowClosing( WindowEvent e)
System. exit(0);

);
∥********** Found **********
fr. setVisible( (4) );


class HandleButton implements ActionListener
public void actionPerformed (ActionEvent e)
System. out. println("The button is pressed!");


热门 试题

单项选择题
V