My problem is that I need to be able to toggle back and forth from windowed mode to fullscreen mode. I can do that fine but if I have window decorations enabled ( frame.setUndecorated(fullscreen) ) then the window decorations will still show up in fullscreen mode. And if I don’t have windows decorations enabled then it wont show up in windowed mode.
I tried using the setUndecorated method to change the decorations but that throws and exception saying that the window is still displayable. So then I tried to dispose of the JFrame first and then set it to Undecorated. This seems to work at first but then I get an exception saying that there is no OpenGL context in the current thread…
If anyone could help me I’d greatly appreciate it. Thanks!