I have two JFrames, FrameA and FrameB. I want to make the other FrameB to pop up infront of FrameA such that the user will not be able to click on FrameA.
What I do currently I disable FrameA when a user takes some action, the only way to enable FrameA is to close FrameB.
My problem is that a user can still click on FrameA even though nothing happens until the user closes FrameB.
I want my FrameB to pop up like a JOptionPane Message Dialog, right at the center of FrameA and to force users to close FrameB before they can click on FrameA.
Why not use JOptionPane itself? The showXXXDialog accepts objects as messages. You can get the content pane's contents of frame B, pass it as message to the JOptionPane and call the required showXXX method.