import javax.swing.border.*; static Border getBorder(final JComponent c) { ret c == null ? null : swing(func -> Border { c.getBorder() }); }