I'm somewhat inexperienced with Java and have been having an ongoing problem with using JOptionPane.showInputDialog. When the dialog appears, it disappears again before I can get to the drop-down or text box. It doesn't actually go away - by using Alt-Tab, I can get the dialog back. This is random and happens about twenty percent of the time, and has happened on a few PCs. I could post code but it's happened on everything from code that I copied directly from the Java Tutorials on the Sun website to things I wrote myself.

I probably should be using JPanel/JFrame for this type of thing but I'm now curious if this is a common problem and if there is a way to correct it.

Post code.
Read API of JOptionPane

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.