OK... the problem is that the JOptionPane grabs focus from the textfield, which runs the textfield's input verifier, which pops up a JOptionPane that attempts to grab focus, which runs the textfield's input verifier, which... well, you get the idea. So the first thing I did was invoke the JOptionPane in another
thread. I did this through SwingUtilities.invokeLater(). This worked, but for some reason three dialogs popped up instead of just one. I think this might be because the first gets popped up for the original focus lost event, then another for focus gained back to the textfield (maybe?), then the last for focus lost to the JOptionpane. I fixed this by adding a boolean field to the InputVerifier to check if it is already showing a JOptionPane. Here's the code I got to work...