IT HAPPENED TO Eli Wallach and Anne Jackson, as it inevitably must to all stars, on the steps of the Freer Gallery. Someone recognized them. Sort of.

"Oh yes, it's him, it's him," squeeked one woman after a sharp-eyed young lad made the initial identification. Hurtling past Anne Jackson, she grabbed Wallach, thrust a Tourmobile schedule at him to sign and asked, with knowing confidence, "Aren't you married to a Japanese woman?"

Jackson, who has been Mrs. Wallach for 29 years, has had a career of equal luminosity and is in fact at this very moment co-starring with her husband in "Absent Friends" at the Kennedy Center, took this bit of news with the requisite amount of aplomb. Things like that have happened before.

"I accepted congratulations after both Glenda Jackson and Anne Bancroft won Academy Awards," she says. "And a woman said to me once, "You're not kidding me, I'd recognize that voice anywhere, you're Arlene Francis." So I told her, 'I would never kid you, madam. I'm Arlene Francis.'"

If anything can be said to characterize the why and how Wallach and Jackson continue to get along, it is this combination of humor and resiliency. They are comfortable with each other, they give each other space. Inside the gallery, for instance, they oblige a photographer by falling into a sidesplitting series of mock-reflective poses with much the same ease they employ in bouncing verbal digs off each other.

"We kid around a lot," Jackson says. "The only way you can stay married that long is if you have a sense of humor, if you express things."

And both Wallach and Jackson are aware that there is a great public interest in their relationship, in how "both of us are career people and able to maintain a marriage in that situation, where the percentage of failure is so great. Even astrologically, we're not supposed to get along at all. I understand the curiosity, but it makes me a little nervous at times."

That curiosity extended all the way to the AFI Theater on Wednesday afternoon, where a question-and-answer session with them drew an overflow throng which was more than happy to witness exchanges like the following:

He: "I like to see people going to see live theater as opposed to dead television."

She (gallantly, after an abortive bit of applause): "Go on, give him a hand on that one."

She (later, after he interrupts her sentence): "Let me finish my point, darling. I let you get your hand."

Or this one, to the final question as to what they'll be doing in August:

He: "Who knows if the marriage will last."

She: "You don't know how lucky you are."

"I've always spoken up, I was encouraged to do so by my father," Jackson says later. "Eli has always had very good feelings about women, he never plays the male chauvinist, but every once in a while I get thrown one of those curves, where it sounds like he's Mr. Milquetoast," as when one woman at AFI noted archly that Wallach was "the silent type" and asked if he got his own way even once in a while.

"I get set up as the heavy and he acts like he's the quiet type and I get very sensitive," she answered almost immediately. "I don't like that image he likes to project."

Off the podium, however, the give-and-take between them is pretty equal, even extending to areas like the story of how they met, in a production of Tennessee Williams' "This Property Is Condemned." Wallach, overhearing her tell the story, asks dubiously, "Are you saying it was love at first sight?" to which she responds "I did" and his riposte is, "She's very nearsighted."

Working together all this time has given them, if nothing else, a finely honed collection of anecdotes about what it's been like. "One night," Wallach relates, "Anne and I had a fight on the way to the theater, a real fight. The action of that particular play has me kidnap her, tie her up, threaten to rape her and yell 'Shaddup' whenever she spoke. Well, it was such a release to go to the theater that night, I really got to use the experiences of the day."

Then it is Jackson's turn and she tells about the two of them appearing in a George Abbott production of the classic show business screwball comedy, "Twentieth Century," taking the roles Carole Lombard and John Barrymore did on screen.

The scene in question was Wallach's big one, where he pretends to die so Jackson will sign a contract with him. "Well, I came on stage and gave this big geshrie (scream) and George loved it. Eli said, 'Is that staying in?' and George said 'I guess so.' Eli was all upset, he said he was out-deathed in his own death scene, but I told him, 'I can't do any less, if anything ever really happened to you, how do you think I'd react?'"

Nothing this dramatic happens in "Absent Friends," one of those paper-thin yet biting British comedies of manners where 45 minutes of stage action can go toward preparing a single joke. Jackson plays a much-put-upon wife who suspects her husband of adultery while Wallach is a classically peppy busybody who makes everybody miserable as he relentlessly spreads good cheer.

Wallach and Jackson chose the play at least partly for the challenge, and partly because working together allows them the luxury most married people don't think twice about, being able to live together. One of the more curious times they were separated was when Wallach went to Italy to make Italian Westerns, an experience he compares to "having a Hawaiian pizza."

"They made up one set like a bar and the set designer is hanging salamis and garlics from the walls. I told him, "You can't have that in a western,' but he just shrugged. Can you imagine going in and saying 'I'll have a whiskey and a corned beef on rye?'"

Wallach is not too high on movies in general at this particular moment, being bothered enough by what happened to him in "The Deep" not to have seen the movie. As if it wasn't bad enough that his character got changed to a villain just at the start of shooting, apparently to redress the racial balance of the bad guys, the key scene that explains his turning evil has been cut in half.

Film, he says, is terribly frustrating because the part of you that ends up on screen often has little to do with the original performance. To emphasize his point, he tells a story about his son Peter, a nonactor, who was cast in a flashback sequence of "The Deep" as a younger version of his father.

"They got him out there the day of the shooting and first they got his clothes all torn and dirty. Then the director says, 'Where's a raincoat, we've got to have a raincoat for him.' They only had one, but he insisted Peter have it.Then they tore the raincoat, the only one they had, spattered it with blood and dirt. Now after all that, they take him and photograph him buried up to his neck, and then they cut the entire scene out of the film!"