Place half the potatoes in a greased 1 1/2-quart shallow baking dish.
Dot with half the butter.
Add half the onions.
Sprinkle with half the flour.
Season with salt and pepper.
Repeat with remaining ingredients.
Pour milk over potatoes.
Bake covered for first half of baking period, in a 400-degree oven for 1 to 1 1/2 hours or until potatoes are tender and brown crust is formed over top.