Use a JDialog instead of a JFrame. JFrames don't support modal mode