Lax immigration policies were thought a solution to that, though I think almost anyone would agree (non the least the immigrants themselves) that the implementation of this solution was bungled fairly spectacularly.
Regardless of the merits of immigration as a solution, the nordics are very much, along many other western countries, kind of stuck between a rock and a hard place with regards to the demographic distribution.
[1] https://upload.wikimedia.org/wikipedia/commons/6/6d/Sweden_p... (it's actually looking a bit better now. For a while it had a very sort of unfortunate buttplug shape)