hi I have a Frame with a button and on click of that button it opens a JDialog which is supposed to be modal... I have tried using the JDialog(String title, boolean modal) constructor and see no effect... so i included the code setModal(true); in the constructor in this case 1. when the setModal(true) is before the setVisible(true) i get 2 dialogs the second one with just the last object added to the view and when i close it the actual dialog is there and is modal 2. when it is after the setVisible(true) i see no effect which is supposed to be correct.
How do i correct is? when i use that constructor isnt it supposed to be modal? Any solutions? Thanks Vidhya
posted 15 years ago
sorry the problem is solved... i gave setModal before the setVisible and it works... i had two setvisible commands by mistake that was the reason for the 2 windows. I dont know y the constructor part is not working... Thanks