It's hard to restrain immigration, when you provide a huge buffet of goodies to attract them. The big question is, IF Sweden chose to get rid of immigrants, how far would they be willing to go in order to compel them to leave?
In the late-19th Century, there was a net emigration of Swedes coming to the U.S. - which offered no "huge buffet of goodies to attract them."
The immigrants currently thronging to Sweden are coming simply because Sweden is not turning them back at the border (or, more precisely: at the airports). They are coming because Sweden is allowing them in. No one is "sneaking" over the border by cover of night. Instead, Swedish border control officers are simply letting them in (because their superiors - ultimately, the ruling government - have ordered them to do so).
Regards,