Yup that's the only way.
All clowns start life as juvies. When they mature the most dominant (biggest) will change to a female and the second biggest will become the male. Once a female, always a female. If she dies, the male will then change sexes and the next up becomes the male.