Java3D starts several system threads and doesn\'t set the isDaemon flag on them. When I dispose the (only) JFrame of my application it won\'t terminate because these threads are
System.exit(0) is correct way to end program.
It's convenient way to handle shutdown in program, where parts of the program can't be aware of each other. Then, if some part wants to quit, he can simply call System.exit(), and the shutdown hooks take care of doing all necessary shutdown tasks such as: closing files, dispose opened windows, and releasing resources.
Read the docu about shutdown hooks.