Added use of JDialog instead of another JFrame