Components are rearranged while making visible using set visible method()

Hi ,

I am using radio having two choices. On click on 1st choce 2 other components gets visible and invisible. When i 1st chose visiblity work as expected then i click on 2 nd choice and both componet become invisible. now again i click on 1st choice components get visible but they are rearranged. The one should 1st comes second and second one become 1st.
Can anyone help me to understand this issue?

Thank you.

Hi,

Are the two components in a same component container/layout? Which container are you using? Could you attach some sample code?