Java JButton - Create a JButton with no border (BorderFactory.createEmptyBorder)

How to create a JButton without a border:

closeButton.setBorder(BorderFactory.createEmptyBorder());

I just tested this on a new Java Swing app, and it works as advertised, removing the JButton border.