I want to create two radio buttons for the "Gender" label. Here is what I got:
maleRB = new JRadioButton("Male", true);
femaleRB = new JRadioButton("Female", false);
radioGroup = new ButtonGroup();
radioGroup.add(maleRB);
radioGroup.add(femaleRB);
But I have no idea on how to set their locations. Do you set the location the same as how you set the location of JLabel/JTextField, etc...? Here is the photo. I want to place the radio buttons beside the label "Gender".