Distance calculator
Example of a "generated" layout based on a user's input
In this case the poster wants a GUI that will ask for a different number of input fields depending on the value entered.
I think this program does what's desired. First a number is obtained using a simple popup, then a full layout is made and finally the window is shown and available for interaction. Rather than it being a 1-shot window it's a fully functioning window should someone want to edit one of the addresses and re-calculate.