I'm trying to create a popup where a user has to choose options from a few different fields.
According to "The Definitive Guide to Java Swing" and the numerous other textbooks on swing that I have piled around me, a JOptionPane is "a special class for creating a panel to be placed in a pop-up window". And a Dialog is "a class that represents the standard pop-up window". Yet, in Java JOptionPane's seem sort of interchangeable with dialogs. I am being told that I can place a JOptionPane "in" a JDialog or JInternal Frame by making a reference of those types and assigning them to the JOptionPane object.
I just wanted an easier way to make a popup. I really didn't want to have to deal with layouts, and the JOptionPane class seemed like an ideal way to get a readymade panel, insert it into some sort of frame/dialog popup, and go from there!
Creating a custom JOptionPane to insert into a JDialog will probably be more trouble than just creating a JDialog to begin with. You will also be limited by the return values possible, although an array of String is always useful.
Life is good on the Ponderosa,<br />but mind where you step.