Sorry Ill edit it into the post:
it just seems to skip over it didn't recognize any input of "!" But I think i also just figured it out:
boolean finalCheck = true;
while (finalCheck) {
userInput = JOptionPane
.showInputDialog("What would you like to discuss? " + topic1 + ", " + topic2 + " or " + topic3);
boolean replyCheck = true;
while (replyCheck) {
if (userInput.contains(topic1)) {
userTopicSelection = topic1;
} else if (userInput.contains(topic2)) {
userTopicSelection = topic2;
} else if (userInput.contains(topic3)) {
userTopicSelection = topic3;
}else {
userTopicSelection = userInput;
}
if (userTopicSelection == topic1 || userTopicSelection == topic2 || userTopicSelection == topic3) {
userInput = JOptionPane.showInputDialog("tell more " + userTopicSelection);
}else if(userTopicSelection.contains("!")) {
userInput = JOptionPane.showInputDialog("You seem a little excited! \nThat's interesting. \nBut I'd rather talk about " + topic1 + ", " + topic2 + " or " + topic3);
} else {
JOptionPane.showMessageDialog(null, "Error: Invalid topic entered, Press OK to try again.");
replyCheck = false;
}
}
if(userTopicSelection == "exit") {
JOptionPane.showMessageDialog(null, "Press OK to exit");
finalCheck = false;
}
}
now when i type "cool!" it actually replies "You seem a little excited! \nThat's interesting. \nBut I'd rather talk about " + topic1 + ", " + topic2 + " or " + topic3"
Now i just need to figure out how to exit this thing and its done, any ideas?