Heat the butter in a medium saucepan, then stir in the flour until well combined. Cook for 2 minutes, then gradually add the milk, beating well between each addition. Bring to the boil, then reduce the heat and simmer for about 5–10 minutes until the sauce thickens and coats the back of a wooden spoon. Season with salt and pepper.
Add the artichokes and ham to the sauce and gently stir together. Spoon into 1 lightly greased medium gratin dish or 4 lightly greased individual ramekins. Scatter over the cheese and sprinkle with the paprika.
Cook under a preheated hot grill for 5–10 minutes until browned and bubbling.