void (AbstractButton b) { super.installDefaults(b); b.setOpaque(false); Border border = b.getBorder(); if (border == null || border instanceof UIResource) { // TODO: This is only for 16x16 icon buttons b.setBorder(BorderFactory.createEmptyBorder(JBUIScale.scale(4), JBUIScale.scale(4), JBUIScale.scale(4), JBUIScale.scale(4))); } }