From my knowledge of C++ applications, once a window is created, it is necessary to perform a continual loop to check for windows messages. If no loop is executed, the program exits. Why do Java programs with a window (or frame rather) created continue to run even though there is no loop? And why do ones without a window created exit? I'm not cirtisizing the language at all, but this just doesn't make sense to me. What happens when a window is created that keeps the program running, even while lines of code following the one declaring the window's creation run concurrently, and after the main function exits (or seems to exit)? Does it have something to do with threads? Whatever it is, please explain it to me. I am eager to program in this language, but I must admit my knowledge of basic language features and mechanics is limited. I haven't studied it in a while, neither have I used it. But if someone can just answer the question I asked, that would be nice.