OpenGLException while recreating the window

i post this problem in the general section. but just incase some of u developers dont check that section, ill post it here as well.

i got this exception today when i tried to recreate my game window with a different resolution.

-->  org.lwjgl.opengl.OpenGLException: Invalid value (1281)
   at org.lwjgl.opengl.Util.checkGLError(
   at org.lwjgl.opengl.Display.swapBuffers(
   at org.lwjgl.opengl.Display.update(
   at com.jme.renderer.lwjgl.LWJGLRenderer.displayBackBuffer(
   at lightAndDark.entry.EntryApplication.main(

the weird part is if i start out with fullscreen mode, i can switch my resolution all i want.
but if i start out as window mode, i cant switch up to a fullscreen resolution coz of this exception.
and to be more specific, i cant switch from 1024*768*32*60*window to 1280*1024*32*60*fullscreen.