You have to respect the dilemma of the judges, being forced to work with women who want to be treated like professionals but dress like sluts. However, fixing the problem is not trivial.
The ABA Journal provides a fashion web site called Corporette that provides dress code advice for female lawyers. Recent headlines include "Can Oxford Shoes Be Worn to Work?" and "Ponytails at the Office: Yay or Nay?"
But there's still a problem. Even if all female lawyers always wear conservative, unrevealing clothing, what will the judge do if an attractive witness appears? Or a provocativley clad accused? What about tarty looking spectators?
And even if all women in the court room don burkas, what if the judge is the kind of guy who likes to imagine an attractive body beneath clothing? Should we prohibit all fit, young, or big-breasted women from court rooms? What if the judge has a foot fetish? ...Force all women to wear boots?
All females in a court room could be made to sit behind a screen so that the judge isn't apt to get a hard-on looking at them, but then there's still the problem of that tempting female voice... It's just too much for a judge to listen to. We could try a voice-alteration device, or perhaps just prohibit women altogether.
Of course, another solution would be to decide that men who are unable to do their jobs around attractive women are unfit to do their jobs. Maybe only women are fit to be judges. And managers. And teachers. And counsellors. And people with any responsibility or authority.