Changed the JFrame to JDialog