Basically, in the renderer and editor, you need to set the JCheckBox
's horizontalAlignment
to CENTER
public class CustomCheckBox extends JCheckBox {
//...
public CustomCheckBox() {
//...
setHorizontalAlignment(CENTER);
}
(nb- The custom editor and renderer both use the CustomCheckBox
)