Barch came back to the Panthers, along with a seventh-round pick in the 2015 draft, for center Scott Timmins on Saturday. The Devils also got Florida's sixth-round pick in next year's draft.
Barch has played in 326 NHL games with Dallas, Florida and New Jersey.
Boyes' deal was worth $1 millon; Gilbert's was for $900,000, sources told ESPN.com's Pierre LeBrun.
Boyes and Gilbert had been with the Panthers on tryout deals. Boyes had 35 points last season for the New York Islanders, and Gilbert is a veteran of 447 NHL games with Minnesota and Edmonton.
The Panthers open the regular season in Dallas on Thursday.