Changed System.out error message to JOptionPane error message