My GraphicButton.java class creates a custom JButton with specific text and font and a rectangular border. My problem is that there is extra space between the last character in the line and the end of the border I would like to remove.
Here's what an instance of GraphicButton looks like with the string "PLAY" and the font FFF Forward (Direct Download Link) added to the JFrame . The red line is the space that I would like to remove .

Here is the code I'm using ( JFrame creation and installation omitted):
GraphicButton.java :
public class GraphicButton extends JButton { private static final long serialVersionUID = 1L;
I am running Eclipse on a Mac with Java 1.8.
source share