I've set an EmptyBorder
around my JCheckBox
(for the purpose of indenting it, but that doesn't really matter). When I select (or deselect) my JCheckBox
, the border gets drawn around it as a dashed black line. I don't want to even see this border at all. How do I keep it invisible?
Here is my (simplified) code:
JPanel myPanel = new JPanel();
JCheckBox myCB = new JCheckBox("hello");
myPanel.add(myCB);
myCB.setBorder( new EmptyBorder( 2, 15, 2, 2 ) );