This is the main reason why Norway and Denmark still feel a bit funny about Sweden even today. HISTORY TIME!
The Napoleon war was basically with France one on side and England on the other, with each of them having a number of countries supporting them. At the beginning most countries supported France, and Sweden was one of the few who supported England from the very beginning.
As the war went on, more and more countries left France and went over to England, with Denmark as one of the very few who stayed with France to the bitter end.
When England won, Denmark was of course seen as one of the big loosers who deserved to be punished for staying on the "evil" side, so it was seen as only fair that Sweden got Norway. The Danes were ready to just give in and get it over with, but the Dane who had been put in charge of Norway suggested that they allowed Norway to break loose from Denmark instead. That way Sweden couldn’t touch them.
Denmark agreed to do this, and Norway finally got it’s own constitution. But that didn’t stop Sweden. When they were told Denmark could no longer hand Norway over, Sweden simply invaded Norway and took it by force. That was the last war between the Scandinavian countries.
You gotta' love how Sweden went from being one of the "good guys" to being a jerk. History is fun like that.