【正确答案】
【答案解析】(1)setLayout(null); (2)btn=new Button("First");
(3)btn.addActionListener (this);
(4)bm. setActionConnnand ("second"); (5)]. setText (str);
[解析] 本题主要考查Java语言中高级事件ActionEvent和AWT基本构件Label的常用方法的使用。解题关键是熟练掌握动作事件Ac-tionEvent和Label构件的常用方法。在本题中,明确注册的事件监听器是监听按钮的,而不是Label的;调用ActionEvent的setActionConnnand ()方法改变了ActionCommand,使按下第二个按钮时显示Command:second而不是Command: First。调用Label的setText()方法,而不是 Button的方法。