they shut down relatuvely early and far more stringently than in Europe. They also tested cases and isolated them from other people.
Estimates in Italy from phone tracking was that 40% of people were breaking quarantine rules.
They banned travel even outside of the city. We imported a load of cases from Milan on the day before their shutdown. They still have restrictions in foreign travel - we didn't isolate those returning from abroad with anything other than advice. The Swedes may follow advice, the UK population not believing a word the government say - not so much.