首页题库练习题目详情
面向对象程序设计单选题中等

在Java Swing中,若要使一个JButton触发ActionListener的actionPerformed()方法,必须进行哪种操作?

A设置JButton的名称
B添加ActionListener到JButton上
C设置JButton的背景颜色
D设置JButton的字体大小