borderPainted
Sets whether a component paints its border. Applies to everything built on a button, including menu items, and to progress bars, tool bars, menu bars and popup menus.
Switching this off, together with contentAreaFilled and focusPainted, is what leaves a button drawing only its own content - the shape a tool bar or a link-like button wants.
Return
this modifier with border painting declared on it.
Parameters
painted
false leaves the border area blank while the border keeps taking up its space, so the content stays where it is.