Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Jcheckbox,但它只有勾号来显示它的选中状态,有没有办法可以将它更改为十字形或圆形?有没有办法将灰色背景更改为白色 setBackground 似乎没有什么不同?
用户 setPressedIcon、setIcon 和 setDisabledIcon
JCheckBox b = new JCheckBox(); b.setPressedIcon(pressedIcon) b.setIcon(defaultIcon); b.setDisabledIcon(disabledIcon)