Julianna Margulies, who plays Alicia on The Good Wife, spoke about working on the CBS legal drama and how long the show might run for, at a SAG Foundation panel on June 17.

Kalinda And Cary's Relationship To 'Become Tedious' And 'Turn Gray?'

Michael Ausiello of TVLine hosted the event and spoke to Margulies about the rewards and challenges of playing Alicia on the show. Margulies, who is also a producer of the show, spoke about its future and how long she expected it to run for. At first she joked, suggesting she expected it to go for a good "eighteen years," but added that co-creator Robert King did have a time frame in mind.

"Robert's always said he had seven years of this show in him, and my feeling is, I want to do it as long as the writer feels he has something to write," she said. "Alicia is basically in every scene. Characters can come and go on the show, but she can't. So as long as they're happy to write for Alicia, I'm happy to play her. My guess is we'll go seven seasons."

Julianna Margulies 'Wants' Alicia 'To Run' For State's Attorney?

She also spoke about what it's like to be a producer on the show and how she works the two duties and is mindful of the concerns of both roles.

"There are definitely times that I have to put my producer hat on and let go of being an actor," she said. "And there are things that maybe I would complain about but because I'm the producer I don't."

The finale of season 5 concluded with Eli Gould (Alan Cumming) proposing Alicia (Julianna Margulies) become a candidate for State's Attorney. A few other big changes were afoot, with Diane (Christine Baranski) deciding to join Florrick/Agos.

The finale, titled A Weird Year, aired on May 18.

Watch the promo for the finale here: