Jennifer Lopez is keeping a positive mindset.

The 51-year-old singer recently opened up about the coronavirus quarantine and coming face-to-face with all of the challenges presented by the year 2020.

"I think all of us during the quarantine were a little bit afraid of the kids just sitting in front of their electronics all day," Lopez told CBS.

The "Hustlers" star is mother to 12-year-old twins Emme and Max, whom she shares with ex-husband Marc Anthony.

JENNIFER LOPEZ STUNS IN MAKEUP-FREE VIDEO, SAYS SHE'S NEVER HAD BOTOX AS SHE LAUNCHES BEAUTY LINE

To keep everyone occupied, Lopez and her kiddos would spend time outdoors, playing Wiffle ball or holding painting parties.

Jennifer Lopez said that her family has enjoyed painting and playing Wiffle ball while staying at home during the pandemic. (Photo by Albert L. Ortega/Getty Images)

Jennifer Lopez said that her family has enjoyed painting and playing Wiffle ball while staying at home during the pandemic. (Photo by Albert L. Ortega/Getty Images)

Like many, however, the multihyphenate appreciated spending extra time with her family.

"For quarantine and being inside the house, it was just spending time together and doing movie time and having dinner together every night, which we don't get to do all the time, and I think a lot of families don't get to do that as much as they want," she shared.

JENNIFER LOPEZ POSES NUDE FOR COVER ART OF NEW SINGLE, WOWS FANS: 'BOLD AND BEAUTIFUL'

Between the ongoing coronavirus pandemic, a tumultuous election season, civil unrest and more, the year 2020 wore on everyone -- Lopez included. She has a strategy for keeping her spirits up, however.

"For me, when I'm in pain or things are tough, I feel like the more of a positive mindset that I can keep and an attitude of gratitude is key to realizing life is going to be OK," the star told CBS. 

Jennifer Lopez said she's keeping a positive attitude to help her get through the struggles of this year. (Photo by Frazer Harrison/Getty Images)

Jennifer Lopez said she's keeping a positive attitude to help her get through the struggles of this year. (Photo by Frazer Harrison/Getty Images)

She added: "Just being grateful for the things we do have and keeping ourselves on track in that way."

The star has managed to keep herself rather busy during the lockdown.

CLICK HERE TO GET THE FOX NEWS APP

In September, she released "Pa Ti," a collaboration with Maluma, followed by the release of "In the Morning" last month.

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

She also recently performed at the American Music Awards and announced the upcoming launch of a beauty line.