You could use MiGLayout as your layout manager. It allows all kinds of customizations, including margins/paddings.
What LayoutManager are you using? Adding margins is quite easy, it depends however on the specific LayoutManager used.
Take a look to the GridBagLayoutManager. Its the most compex layout manager but everything can be acomplished whith it.
It uses the GridBagConstraintObject which has the inset property, it specifies the separation to the top, bottom, left and right components.
example: GridBagConstraintObject.insets.left=20
You could achieve a much better layout for the example above by using DesignGridLayout in just a couple of lines of code (one per row in your layout). DesignGridLayout will automatically use the correct spacing for the runtime platform.
besides I would highly suggest that you DON'T use TitledBorders in your form because it prevents ANY LayoutManager (as advanced as it may be) from automatically aligning correctly the various components across different groups. Instead you could use a JLabel with a JSeparator (there are examples in DesignGridLayout, but this works with any other LayoutManager).
FormLayout is another good layout manager. With a good GUI editor like JFormDesigner it makes GUI building easy enough. JFormDesigner actually automatically adds sufficient padding in most cases. I have to recommend against using GridBagLayout. It does the job alright, but is very complex which makes it difficult to use and maintain.