If I understand your question correctly, you want to horizontally center the JRadioButtons
in the JFrame
, yes? Try the setHorizontalAlignment()
method. Add the following lines to your initComponents()
function:
latwy.setHorizontalAlignment(JRadioButton.CENTER);
sredni.setHorizontalAlignment(JRadioButton.CENTER);
trudny.setHorizontalAlignment(JRadioButton.CENTER);