Because an IDE, especially a GUI builder, hides a ton of stuff from you, which makes it much harder to understand what's going on. For example: why are you extending JFrame?