A Java gravity simulator