Dalla documentazione di dispose() nella classe java.awt.Window:

Note: When the last displayable window within the Java virtual machine (VM) is disposed of, the VM may terminate. See AWT Threading Issues for more information.