Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Modal Dialog  RSS feed

 
Balaji Anand
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Balaji Anand
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!