Is it possible to make the border with 0 thickness but still be visible?
You can use a CompoundBorder
. Create a LineBorder
as the outer and an EmptyBorder
(with -1 offsets) as the inner.
The total size of the Border will be 0 and not take up any space, but it will paint on top of the label, instead of outside the bounds of the label.