while loop GUI