This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Modal Dialog

 
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
    Bookmark Topic Watch Topic
  • New Topic