开发者

adding border to jcheckbox

开发者 https://www.devze.com 2023-01-27 19:55 出处:网络
Does anyone know if there is an easy way to put a border around a JCheckBox object including the label? setBorder doesn\'t seem to have any effect. I know I could put each checkbox inside of a JPanel

Does anyone know if there is an easy way to put a border around a JCheckBox object including the label? setBorder doesn't seem to have any effect. I know I could put each checkbox inside of a JPanel and border that, but is there no way to border the entire JCheckBox by i开发者_运维百科tself? Thanks


on a jcheckbox the setborder does work, its just that the border is not painted. all you have to do is call setBorderPainted(true) and it should work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号