I don't understand the question. By default when you use dialog.setVisible(true), that dialog will be display and have focus so the other Windows in your application will not be able to receive events.
I'll add my interpretation of the OP's question, but I don't know the answer. The OP is asking how to make the inactive windows 'look' inactive or unselectable. I've seen this done by changing the opacity or apparent brightness of the background windows by shading or dimming them. Is this sometimes controlled by the default look and feel?