if (input.equalsIgnoreCase("N")). Input cannot match this, ever. It is null and never assigned any different value, and the compiler knows this. You can fix it by initializing its value to an empty string.
JOptionPane.show* messages will return a result for you to work with. Strings for input, and integers for confirmation and option dialogs.