How to Align Radio Buttons in MigLayout?
Java
1
Posts
1
Posters
0
Views
1
Watching
-
http://i42.tinypic.com/dgl9ns.jpg This is the Image of what I have right now. I want to align Radio Buttons so that It will not have the space left to "Y" ,so that they will align correctly.
String yesString = "Y";
String noString = "N";
JRadioButton yesButton = new JRadioButton(yesString);
JRadioButton noButton = new JRadioButton(noString);And below while adding
yesButton.setMnemonic(KeyEvent.VK_R);
yesButton.setActionCommand(yesString);
yesButton.setSelected(true);noButton.setMnemonic(KeyEvent.VK\_R); noButton.setActionCommand(noString); ButtonGroup group = new ButtonGroup(); group.add(yesButton); group.add(noButton); panel.add(yesButton,"cell 12 12 , gap related"); panel.add(noButton,"wrap , align label,gapleft 0");
EDIT: I just did this and solved my problem
panel.add(yesButton,"gapleft 0,split");