Adding a border to jcheckbox

Does anyone know if there is an easy way to place a border around a JCheckBox object, including a label? setBorder does not seem to have any effect. I know that I can put every checkbox inside a JPanel and border, but is there no way to completely limit the entire JCheckBox? Thanks

+5
source share
1 answer

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

+7
source

All Articles