问题
To make it short - my application's main JFrame has 2 JInternalFrames. In one of them, I want to have a JButton which will open a JDialog (/JOptionPane/JInternalFram). I want to set the JDialog modal to that JInternalFrame - I want to block that JInternalFrame and leave the other one accessible. I couldn't achieve this using JDialog as it only accepts Frame, Window and Dialog as owners (and it's not possible to cast from JInternalFrame to Frame). I tried using JOptionPane which accepts JComponent as a parent, but unfortunately it blocks the whole main JFrame. How can I achieve the desired behavior?
来源:https://stackoverflow.com/questions/33520920/how-to-make-a-frame-like-component-modal-to-jinternalframe-and-block-only-that-j