use JOptionPane instead of JPanel