Sigh. What compiler are you using with BlueJ? What compiler were you using with the IDE you were using before? What happens when you compile and run from the command line?
You STILL have not fixed the problem of adding components to a JFrame that has already been made visible.
I stand by my statement- it's not the compiler. Blaming the compiler is meaningless. It's something you, or your IDE, or your OS, is doing- probably with the focus. Or you're misunderstanding what's going on- I see a MouseListener there again, even though your question was about a keyboard input?
I know you want to be a good programmer, but I can tell you right now, if you don't start listening to the things people are saying (instead of just disagreeing and ignoring them for no reason), that will never happen.