Play video content SplashNews.com

Ben Affleck's setting a shining example of how to not let a parking ticket -- or two -- ruin your day ... even when the meter woman is also dishing marriage advice and backhanded compliments.

The ex-Caped Crusader got in a little trouble Tuesday as he was leaving a Starbucks in Brentwood -- he already had a ticket on his windshield for an expired meter, and was in the process of getting another one for expired tags on his classic Chevy Chevelle SS.

Ben didn't let it get him down, though. He and the parking enforcement officer chatted it up about cars while she was writing him up, and to show there were no hard feelings at all ... he got a hug out of her before he left.

That's when she hit Affleck with a "You look better in person," and voiced her opinion on his relationship history ... he took it all in stride.