Anne Hathaway chooses to look at the troubling period after her Academy Award win almost a decade ago as an “opportunity” to learn.

Hathaway, who won a best-supporting actress Oscar for her turn in 2012’s “Les Misérables,” spoke at Elle’s Women in Hollywood event on Monday night about the hatred she endured online and in the media leading up to and, particularly, after her win.

“Ten years ago, I was given an opportunity to look at the language of hatred from a new perspective,” Hathaway said, according to a transcript published by the magazine’s website. “For context – this was a language I had employed with myself since I was 7. And when your self-inflicted pain is suddenly somehow amplified back at you at, say, the full volume of the internet … It’s a thing.”

Hathaway said her experience made her realize “I had no desire to have anything to do with this line of energy” and “I would no longer create art from this place.”

“I would no longer hold space for it, live in fear of it, nor speak its language for any reason. To anyone. Including myself,” she said.

Hathaway won a flood of awards for her performance that year, including a Golden Globe and a BAFTA, and was considered a heavy favorite for the Oscar. With her success, however, came harsh criticism.

“There is a difference between existence and behavior,” Hathaway added. “You can judge behavior. You can forgive behavior, or not. But you do not have the right to judge – and especially not hate – someone for existing. And if you do, you’re not where it’s at.”

She concluded on a positive note, pointing out how hatred is a learned behavior that can be unlearned and changed.

“The good news about hate being learned is that whoever learned it can learn,” she said. “There is a brain there. I hope they give themselves a chance to relearn love.”

Earlier in her speech, the “Devil Wears Prada” actress acknowledged the evening’s other honorees, who included Sigourney Weaver, Ariana DeBose, Sydney Sweeney, Michelle Yeoh, Issa Rae, Zoe Kravitz and Olivia Wilde.

“Be happy for women. Period,” Hathaway said. “Especially be happy for high-achieving women. Like, it’s not that hard.”