You dont need to modify the preferredSize of the JLabel, you can use the GridBagLayout Manager to specify separations between components, you only have to use the GridBagLayout in the container and add the JXLabel to it with a GridBagConstraints object specifiying the insets to the left: