The most reliable exclusive full screen mode is in the native windowing systems of JogAmp (NEWT) and LWJGL.
Well I think I will use LWJGL if its true that this is much less susceptible as JFrame.
All suggestions above based on Java2D seem not to have been fully tested under several operating systems. In my humble opinion, claiming they work without performing these tests is really a bad idea. However, princec is right, Java2D and bindings to OpenGL are 2 different kinds of APIs. I don't want to start another flame war but you can consider using JogAmp too.
That was because the computers that they had in school had insanely old Intel cards (+ possibly permission problems) that made any attempt to go to fullscreen crash. That was with LWJGL though, but the JFrame trick works no matter what you draw to it of course.
What is the reason if you dont have permission to your graphic card?
I think it's a special case if you are at a school where the computers has old Intel cards.
It would be better to know exactly why it didn't work before concluding.
So thats the difference?
JFrame is stable if you could have permision problems and LWJGL is stable for all other cases?
JFrame is stable, the only problem comes from the exclusive full screen support introduced in Java 1.4 which has never been very reliable across platforms, that was why I used simulated full screen mode until it stopped working under GNU Linux with KDE 4. Then, I was forced to switch to NEWT (JogAmp) and I'm extremely glad of it. I can easily change the resolution and switch to full screen / windowed mode at runtime. I assume that if you use Java, you worry about the support under several operating systems.
Why not considering using JavaFX? Has someone tested javafx.stage.Stage.setFullscreen(true)?
Here a little "fullscreen" makeshift class.
Not very clean, but should be a good start.
Thx for this but at first I want to look around, what's better.
It's just plain exclusive full screen mode and his example is more dangerous than the one provided in the Java documentation (look at the missing try/finally clause):http://docs.oracle.com/javase/tutorial/extra/fullscreen/exclusivemode.html
Either way, I will learn OpenGL programing in my study.
So I can hit two birds with one stone
Good luck with JogAmp... or LWJGL