Question

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 itself? Thanks

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top