cancel
Showing results for 
Search instead for 
Did you mean: 

How to include space between radio buttons?

Former Member
0 Kudos

Hi

I would like to know how to include space between radio buttons while using classlib.

Below is my code snippet:-

RadioButtonGroup rbg1 = new RadioButtonGroup("rbg0"+i);

rbg1.setColumnCount(3);

rbg1.addItem("3","");

rbg1.addItem("2","");

rbg1.addItem("1","");

I tried including text and setting encode to false but I got an exception:-

rbg1.addItem(3,"include Space");

rbg1.setEncode(false);

setEncode throws exception->symbol cannot be resolved.Do I have to include some imports to resolve this error?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

Thanks for the response.

I am using htmlb radio button(classlib) in a jsp dyn page application. I want to create space in between the radio buttons.

Former Member
0 Kudos

Hi,

That link is for jspdynpage radiobuttongroup only, in the bottom you cna find the classlib of the code for radiobuttongroup.

Regards

Suresh

Former Member
0 Kudos

I have referred it but I am still not able to find a method which can help me add spaces between the radio buttons.

I also tried to setEncode(false) for the text present but it did not help me as I got the following error:-

(com.sapportals.htmlb.RadioButtonGroup) has protected access in com.sapportals.htmlb.RadioButton

RadioButton r=new RadioButton(rbg5);

r.setText("create space");

r.setEncode(false);

Thanks in advance

Former Member
0 Kudos

Hi,

The method setEncode is for format the html text it does not help to include space between your texts.

Tell me what exactly you want to do? Place your code here.

Regards

Suresh

ravindra_bollapalli2
Active Contributor
0 Kudos

hi,

check the link

http://www.java2s.com/Code/Java/Swing-JFC/GroupRadioButton.htm

if this is the case let me know where u struck

bvr

Former Member
0 Kudos

Hi

I want to create space between my radio buttons aligned horizontally.