You likely have set up your project wrong. I've never been able to get Netbeans to work, but with all the other development environments I've ever used one must pick a project type when setting up a project. Examples of possible project types would be GUI projects or console mode projects. If you choose a console project and somehow manage to get your linker settings right, you'll be able to create GUIs, but you'll still end up with a console window, as you seem to have found to your dismay.