I am writing a test program as follows:
Without any code we can't help you much... are you calling jFrame.dispose()?
public void dispose()
Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children. That is, the resources for these Components will be destroyed, any memory they consume will be returned to the OS, and they will be marked as undisplayable.
More information available here