Sep 21

myCheckbox.setBorder(new LineBorder(, 2));

When you use the above code to add a Border to a JCheckBox your border will more than likely not display. Reason being that JCheckBox sets the UI property borderPainted to false.

To have the border displayed you need to explicitly tell the JCheckBox to paint it’s border using the following call


written by objects \\ tags: , ,