"Honestly, I didn't even have a move coming into it," Barzal said. "I just was trying to read off him and got in tight there. It's kind of a move I've done for a while and went to my backhand."
WATCH: [All Islanders vs. Panthers highlights]
Anders Lee, Thomas Hickey, Brock Nelson and John Tavares scored for the Islanders (16-8-2), and Joshua Ho-Sang had two assists. Halak made 39 saves.
The Islanders have won eight of their past 10 games.
Roberto Luongo, who earlier this season became the fourth-winningest goalie in NHL history, left the game early in the second period with an apparent lower-body injury. He'll have an MRI on Tuesday.
Keith Yandle had a goal and two assists for the Panthers (10-13-4), who have lost three straight games (0-1-2). Aaron Ekblad and Barkov scored power-play goals, Denis Malgin had a goal, and Trocheck had three assists.
"It's tough," Trocheck said. "Our No. 1 goalie has been outstanding for us the last four, five years, so it's obviously tough whenever he goes down. And to see him in so much pain, it kind of gave us a little boost almost after that just to try to kind of win it for him."