I want to show a fullscreen color and draw some lines. The program should work on Windows _and_ OS X. So I can not just set the window to the screen size. This will work on Windows, but not on OS X where the menu bar and dock will still be visible.
I came up with the following little program which compiles fine, but shows a gray window shortly after the correct blue window is painted. Also the event handling will not work and I don't see an error. Pressing SPACE should exit the program, but doesn't.
Thanks for your hint regarding "isFocusableWindow". That helped me so far that now I have the event handling working and the blue filled full-screen is shown correct. I changed the JWindow to a JPanel in a JFrame.
But one problem still remains. Now the paint() method shows no effect!? I try to write a text and to draw a line on the fullscreen window, but the text and line does not show up. I still don't see the error in my code :-(
Shouldn't paint() automaticly be called (passive rendering) when I override it.