+1  A: 

It looks like there are two culprits:

  1. The mini-JPanel containing the two radio buttons has a FlowLayout which defaults to adding 5 pixels of padding around each component.

  2. Doing radioButton.setBorder(null) eliminates another pixel's worth of space around the buttons. It also screws up the dotted line drawn around them when they have focus, though.

John Kugelman
flowlayout is generally poor on anything but lists of buttons (of the typical "Cancel" "Accept" variety)
tucuxi
And it's no good on buttons because it gives them variable size - very untidy looking; a grid layout is better for buttons. Flow layout is pretty much useless.
Software Monkey
You are right -- there is a 1px difference between Accept vs Cancel buttons in a FlowLayout on my platform. On the other hand, it centers and spaces things nicely, which your typical grid layout does not.
tucuxi
A: 

Use a GridBagLayout, and make sure to anchor cells (each label and checkbox would have its own cell) towards the left or towards the right as needed. The labels would be right-justified, the checkboxes would be left-justified.

Since customizing GridBagLayouts by hand is a hassle, I recommend using the NetBeans GUI builder and adjusting them using its graphical "customize" tool.

tucuxi
Bad advice; use a table-based layout for things where GridBag may be the only other alternative. There are a number of good table-based layout available on the net for free.
Software Monkey
GridBag *is* table-based, and the poster is clearly looking for something table-like. Yes, others may be easier to use, but this one is included with the JDK and allows a great level of control over the results.
tucuxi
A: 

Another solution can be to change margin (radionbuttons's setMargin method). This should do the job. The only downside is that margins/insets will be different for different LAFs.

eugener