Sweden not selling them parts would be the end of Sweden selling planes to anyone.
But Sweden is already member of the Cuture Combat Air System (FCAS) initiative to create a 6th gen air war system of systems, alongside nato members. And this kind of colaboration will be even more natural when/if they join Nato.
Also the real question would be, would Hungary see it as a credible threat. Were they to go ahead with that, they'd find themselves with no airforce and unhappy allies. That sounds like a raise they couldn't afford to raise.