one hour flight rather than a five hour train ride
If you do this, make sure you're comparing apples to apples. Copenhagen airport is convenient to the city center, but Stockholm's main airport, Arlanda, is 20 miles outside of town. There are several options for getting from Arlanda to central Stockholm; some will save you time, some will save you money, but none will save you both. For example, the walk-up fare on the Arlanda Express is 280 kr, which is more that you might pay for the whole train ride from Copenhagen to Stockholm.
(Is there a ferry from Copenhagen to Stockholm? I know there's one from Copenhagen to Oslo, and from Stockholm to Helsinki and other points east, but I haven't heard of one between Copenhagen and Stockholm.)