Jason Merritt / GettyImages.com
Jason Merritt / GettyImages.com

It wasn't just the sun heating up the Hawaii set of "Cougar Town" Wednesday. While filming, Courteney Cox took a dip in a teeny-weeny two-piece.

"Being 40-something is fantastic," she told UsMagazine.com last year. "All the confidence I wish I had when I was 30, now I have it."

She credits plenty of gym time for her fab physique. "Some people might not want to show the parts of them that aren't the best, but I work out really hard," says Cox, who has trained with celeb fitness guru Tracy Anderson. "I try really hard."

It's paying off. Also taking notice? Co-star and rumored beau Brian Van Holt. During the Hawaii shoot, the pair had separate rooms, but "Brian went in and out of her suite four times a day," a source tells the new issue of Us Weekly (on stands now).

(A Cox pal insists the two are just friends.)

For more details on how Cox got cozy with her co-star in Hawaii, check out the new Us Weekly, out today.

RELATED ON WONDERWALL & MSN:

Find out which of your fave celebs love hitting the beach

See which other couples called it quits or found new love last year

Photos of Courteney through the years

RELATED ON USMAGAZINE.COM:

PHOTOS: Hollywood's hottest bodies

PHOTOS: Stars' bikini-body secrets

PHOTOS: Courteney and David Arquette, the way they were