I\'m wondering how to do something only if Integer.parseInt(whatever) doesn\'t fail.
More specifically I have a jTextArea of user specified values seperated by line
parseInt will throw NumberFormatException if it cannot parse the integer. So doing this will answer your question
try{ Integer.parseInt(....) }catch(NumberFormatException e){ //couldn't parse }