How can I check the JTextField only contains upper and lower case letters and '-' using regex, and then add that to an ArrayList? I've looked all over the place and most places say the same kind of thing, but I can't figure out what I'm missing. Here's the snippet of code that's going wrong:How can I check the JTextField only contains up