代码如下,b.Font = new Font("System", 8);这句话报错了 但是写了import java.awt.Font;还是不对。。不知道错在哪?
for (int i = 0; i < this.rOp.length; i++) {
// 新建按钮
JButton b = new JButton(this.rOp[i]);
// 为按钮增加事件
b.addActionListener(getActionListener());
// 设置按钮颜色
b.setForeground(Color.red);
b.Font = new Font("System", 8);
result[i] = b;
}