Replaced the save warning with a JOptionPane