您好,我尝试覆盖普通 JButton 的设置。除了背景颜色之外,每个设置都在变化。我究竟做错了什么?
public class Button extends JButton {
int red = 0;
int green = 175;
int blue = 206;
Color kleur = new Color(red, green, blue);
public Button(String text) {
super(text);
this.setBackground(kleur);
this.setFont(new Font("Tahoma", Font.PLAIN, 22));
this.setBorder(null);
this.setFocusPainted(false);
this.setContentAreaFilled(false);
}
}