How to make JFileChooser always on top?
Hi, I'm currently making a program to receive file.
When a request to receive file arrived, a JOptionPane popped up to get user input(accept or reject).
If the user choose accept then a JFileChooser will be popped up and the user can choose the directory to save.
The problem is while the user is choosing the file, if there's new request arrived, the JOptionPane will block the JFileChooser.
What I tried:
1. Insert JOptionPane into modeless JDialog, it failed because it also block the JFileChooser.
2. Making modeless JDialog like JOptionPane, it failed because I don't know how to pass 'accept' button parameter and to make receiver to wait for the choose action.
3. Override createDialog of JFileChooser and change the ModalityType, it failed because JOptionPane still block the JFileChooser
I tried to override JOptionPane but don't know how to do it.
To summary it, I want to make either JFileChooser always on top or make JOptionPane not to block the JFileChooser.
I want to prevent the blocking to happen, can someone provide a solution?