Sometimes your code may warrant lots of try/catch blocks. But when
that does happen, you should re-examine your design to see if perhaps
you are coding procedurally instead of objectly (is that a word?)
In this case, you might try the exception's toString() method to see
if it will give you enough detail to tease out the line number. That
will work for a school project.
In this case, you might set up a loop:
While(...) {
try {
for (int i=1;i<4;i++) {
intV = Integer.parseInt(JOptionPane.showInputDialog("type the " + i
+ " number"));}
} catch (Exception e) { examine value of i to determine which one
failed}
} // end while
a19859 suggests using a boolean variable. You could add that advice
into this advice and have strong control over the inputs.
There are several other ways to handle this issue, but the general
idea is to merge your design with suggestions to arrive at a solution.