• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

multiple modal dialogs

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Is it possible to have more than 1 modal dialog for different JFrames. I have to pop up a modal dialog on click of a button ( which is on a JFrame), that part is easy but tricky part is, there could be cases where I have multiple instance of JFrames visible on screen but since a Modal Dialog is already poped up it blocks the input to other JFrames.
Is there a possible solution out of this ? I used to think that a modal dialog is modal to its parent Frame , but it seems to be modal to all other Frames.
Regards,
Vijay
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vijay,
As you may have guessed, Modal is to your application (all Frames). The only way out is to use non-modal dialogs and have each frame keep track of their own private dialog.
Regards,
Manfred.
 
Vijay Kashyap
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Manfred,
Thanks for replying to my query.
Could you point out how to make a JDaolog behave as a modal dialog with out setting it modal explicitly. I tried JLayeredPane, it seems to provide soln only for JPanel but not JDialog. Is there any neat solution to my problem ?
Regards,
Vijay
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vijay,
No, there is no way to make a dialog modal to only a frame in Java. I don't know of any solution to your problem without writing some native code routines.
Regards,
Manfred.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic