Judge Amy Gray is doing just fine, thanks, as a rookie in juvenile court. Actress and executive producer Amy Brenneman is doing fine too, thanks to viewers who have made CBS's "Judging Amy" the season's top new drama series.

Brenneman is one of the forces behind the series about three generations of women in the same house -- the young judge, her daughter and her mother.

Part of the series is based on the career of Brenneman's real mother, a Connecticut judge; part is drawn from the experiences of co-executive producer Barbara Hall, who was a single mother for four years; and part, say both Brenneman and Hall, is based on their relationships with their own mothers.

But lest a viewer dismiss "Judging Amy" as simply a gentle family drama, think again: The court cases the young judge faces bring a harder edge to "Amy" than to other shows with which it's been compared. And the formidable Tyne Daly as Amy's mother, Maxine, lends a flinty and sometimes amusing touch.

That combination has made the new drama the second-most-watched new series of the season, behind only "Stark Raving Mad," a show that benefits in ratings from its plum slot between NBC's highly popular "Frasier" and "ER."

In the series opener, Amy Gray got off to a shaky start her first day on the judicial bench by hiding in bed until her mother pulled her out. But as the episodes rolled on, her confidence grew. And so did the show's audience.

The series -- the last pilot CBS ordered, said Hall, and "never a shoo-in for the schedule" -- debuted on Sept. 19 and by Jan. 2 ranked No. 15 among all shows. The series proved formidable on Tuesdays at 10, and ABC decided to move its new divorce drama "Once and Again" to Mondays, leaving the more male-oriented "NYPD Blue" to battle "Amy" for viewers. Up to that point, CBS said two-thirds of "Judging Amy" viewers over 18 were women.

It was on "NYPD Blue" where Brenneman won an Emmy nomination for her portrayal of druggy police officer Janice Licalsi during the 1993-94 season, and where she met director Brad Siberling, whom she married in 1995. He went on to direct the "Judging Amy" pilot.

"Amy's" success has sometimes been linked with that of NBC's "Providence," another female-driven drama that debuted last January and became a hit. Both feature single professional women in their thirties who are close to their families -- each has two siblings -- and at a crossroads in life. Both shows are set in mid-sized northeastern cities.

On "Amy," attorney Amy Gray returns from New York City to Hartford, Conn., with her 7-year-old daughter after her marriage to Michael Cassidy breaks up. Offered a post as a juvenile court judge, she moves in with her widowed mother.

Hall, who rewrote the pilot last year after CBS rejected the original script by two male writers, said she was given one week to do it -- a task that didn't faze her.

"I loved `Amy,' " said Hall. "I thought, `Oh, I know this show. It's my life.' "

The series, said, Hall, "operates on a principle that you never really finish growing up. So Amy at 35 has to go home to learn some lessons she might have missed, which led her down what was clearly the wrong path for her. It's really a starting over for her. This is the notion that you continue to change throughout your life and that growing up doesn't just happen on shows where people are 20 and 25 and 18 years old."

Hall, who was divorced when she was 35, wants to show that single mothers can survive on their own and that divorce is not always tragic.

"It's a depiction of single motherhood that isn't bleak or a struggle," she said. "Divorce can be okay for kids if you're responsible -- that's one of the things I want to show. Homes can be equally broken if they're intact.

"I wanted to show a different kind of single mother who wasn't actually suffering that much. It became very important to me that there was a strong sense of family and that all families don't have to look alike, can also be friends and cousins and aunts and uncles. They're so important to raise a child. Once you get divorced, you have to ask for help."

Besides Hall and Brenneman, the show has two other executive producers, Connie Tavel and Joseph Stern.

"This is a very collaborative process, a collaborative art form," said Brenneman. "Everybody who joined in had a sense of what it was. It's very productive."

Brenneman was making a videotape tribute for her mother's birthday when she first saw the possibility of a series. She spent three days in the Hartford court, she said, "reacquainting myself with a lot of people that I had known growing up -- social workers and judges and probation officers. I kept thinking, `I think there's a TV show here.' "

Judge Frederica Brenneman is the technical consultant for the series. Named in 1967 to be the second female judge in Connecticut's history, she dealt with many cases involving juveniles.

"She's sent a lot of notes from trials, ideas she thought would be good for stories," said Hall. "It wasn't so much taking stories directly, but I got a sense of her world and her voice."

"Amy" is the third series for Daly, who owns five Emmy Awards, four for "Cagney & Lacey" and one for "Christy."

"With Tyne, you get an all-purpose collaborator," said Brenneman. "I don't have any conflicts with Tyne that can't be folded into the character."

Daly's Maxine Gray has returned to her job as a social worker and is waging a few battles of her own against a younger female supervisor. And when Amy, who has spent her day in a male-dominated profession making tough decisions regarding juveniles, returns home, she is likely to find herself on the receiving end of Mom's opinions. Still, tart-tongued as she may appear, Maxine has the longer view that the freshman judge often needs.

Daly, who has three daughters and two grandchildren, has her own take on her character: "I'm beginning to like her, but I don't know much about her yet. She doesn't say `okay,' she doesn't say `kids.' I'm finding out about her by the combination of the words they give me, and the input of the director, and the imagination that I have about the woman."

But Daly has an additional view of her boomerang children: "When I first met with Barbara and Amy and Brad, who directed the pilot, I'd read the material and thought it was interesting. But I said to them, what you're missing is how furious Maxine is because they're home. Here she was, ready to put her feet up and have a scotch, and they're back. And it's her fault because she invited them back. . . . It's four months later and she's still mad."

Daly also sees the drama as "an opportunity to talk about this female dynamic, this grownup mother and daughter and the raising of the third generation, with some seriousness and delight. We can see if these women are of any use to each other. Conflict's not hard to find. What's interesting to find is how these women help each other and love each other and get angry at each other as grownups, because each of them has a reality and a persona."

In creating those personas, Hall said, "I took certain elements of Tyne as a person, my own mother and Amy's mother to create Maxine. Tyne's life helped me understand that all our lives are constantly changing, if we're lucky, and that she has that experience to pass on to Amy. Tyne Daly is a strong, funny presence. And there's a lot of humor in my family. We used humor to defuse situations, instead of making up or talking it out. The way my family would communicate is through joking."

Karle Warren plays Amy's 6-year-old daughter, Lauren Cassidy, whose lines are occasionally drawn straight from the mouth of Hall's 7-year-old daughter, Faith Harding. Faith also appears as young Amy in the family photos that appear with the series' introductory title credits.

"Of all the characters, the most direct translation is from my daughter to Lauren," said Hall.

Marcus Giamatti and Jessica Tuck play Amy's older brother and sister-in-law, Peter and Gillian, who are having difficulty conceiving a child and recently decided to adopt.

Richard T. Jones is the court services officer, Bryce Van Exel. "Richard brings weight to that courtroom," said Hall. "Something about that presence and demeanor says it's a really important job and really important world."

Dan Futterman, a native of Silver Spring, Md., is Amy's younger brother, Vincent, a dog groomer, poet, writer of short stories, and the most fully-developed male character on the show. Although he doesn't live with his mother and sister, he shows up often enough, and in one episode sought brief refuge back in his old room. In Vincent's past, he suffered a nervous breakdown; in one episode, he was shot; in another, he interviewed prospective roommates. One story paired him with an older woman, played by Kathryn Harrold, who sent his stories to a friend in publishing without his approval. He ended that relationship when he saw she might tend to take over his life.

"I think he's an amazing character," said Brenneman. "The strength is in his observation. His world and his voice are important."

Hall said aspects of Vincent are inspired by her husband, writer Paul Karon, a graduate of Herndon (Va.) High School and the University of Virginia. They were married just before she started rewriting the pilot. He wrote the show's Halloween episode.

"I've always joked that there's a lot of my husband in him [Vincent]," she said. "He's the youngest of three kids, really smart, brilliant. He worked on Variety and wrote a lot about technology and films and special effects."

But it's Hall who has even more experience with television stories. A native of the southern Virginia town of Chatham, Hall headed for Los Angeles two days after she graduated from James Madison University. She has been co-executive producer of "I'll Fly Away," co-producer of "Moonlighting," producer of "Anything But Love" and story editor for "A Year in the Life," and has written scripts for "Family Ties," "Newhart," "ER," "Chicago Hope" and "Northern Exposure." She also has written two feature films, "Heart" and "Sylvie," co-founded a folk rock band and written several novels. One, "A Summons to New Orleans," is based around a trial.

"I'm a law junkie," she said. "I'm particularly interested in juvenile court, interested in the issues of children. It's a new arm of the law. Juvenile court as we know it didn't come about until the sixties. That children have rights and advocates and a separate legal system is new."

Brenneman was expected to follow her parents and brother Matthew to Harvard Law, but she and her brother Andy chose other paths. He creates interactive software for a California firm, she said. She graduated from Harvard in 1987 and set out for a career in acting, co-founding Cornerstone Theatre Company, a repertory troupe. But she had so little income, she said, "I constantly was going up to Hartford to hang out with my folks."

It was her father, Russell, an environmental lawyer, who encouraged her dreams. "He's a real follow-your-bliss kind of guy," she said.

Her bliss took her not only to "NYPD Blue," but also to "Frasier" last season and to Michael Mann's 1995 "Heat," among other films.

Two weeks ago, she was a People's Choice Award nominee as best actress in a new series; Sunday she's a nominee for a Golden Globe Award. So if you're judging Amy, you might say so far she's doing fine, thanks.