I am working on a blackberry application which includes radio button controls.
HorizontalFieldManager hr = new HorizontalFieldManager();
setTitle("UI Component Sample");
RadioButtonGroup rbg = new RadioButtonGroup();
RadioButtonField r1 = new RadioButtonField("Option 1",rbg,true);
RadioButtonField r2 = new RadioButtonField("Option 2",rbg,false);
hr.add(r1);
hr.add(r2);
add(hr);
Working with this code I can see my both radio buttons in curve device but when I install my app in Torch device, only 1st radio button is visible on the screen.
Getting problem in showing one radio group in a horizontal field.
It works when i use a vertical field for a group.
And Horizontal and vertical both works when i works on curve device.
Please suggest what type of bus or problem this is.


In OS 6,
RadioButtonFieldcauses some problem regarding its width. Overriding thelayout(int, int)method may solve your problem. Try following code.