changed code to JOptionPane......Changed output