I want to create a dialog that looks and behaves like a JOptionPane, but also changes its icon based on what the user selected in the input dialog. I only care about the input dialog case - the other types of JOptionPanes don't need variable/dynamic icons. Is this possible? I haven't found a way to do this yet.
I did, however, manage to build a custom JFrame with a default button, a cancel button (pressing Escape when focus isn't on the JComboBox closes the JFrame, as it should), and the desired behavior. I just can't figure out how to make it look better - or is there a better solution, say, involving extending JOptionPane?
I did, however, manage to build a custom JFrame with a default button, a cancel button (pressing Escape when focus isn't on the JComboBox closes the JFrame, as it should), and the desired behavior. I just can't figure out how to make it look better - or is there a better solution, say, involving extending JOptionPane?