• 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

how to disable parent jframe when child jframe is active

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...
Please anyone tell me as how to disable parent frame or window when
child frame is active.


when i click on a jbutton on one frame, a new frame will open. while this new frame is open i want to disable the first frame. like disabling any mouse click on first window. and when i close new frame then i have to enable first frame. and both the frames have main method in them.

and if i have to do this in net beans then how to do it?

thanks in advance for any help....
 
Rancher
Posts: 3324
32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't use a "child frame". Instead use a "modal JDialog".
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out the API for JOptionPane class. It has numerous showXXXDialog methods which will help you setup a modal dialog easily.
 
sunil ingalagi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Camick wrote:Don't use a " child frame". Instead use a "modal JDialog".



Thank you very much Rob
 
sunil ingalagi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Maneesh Godbole wrote:Check out the API for JOptionPane class. It has numerous showXXXDialog methods which will help you setup a modal dialog easily.



Thanks maneesh
 
reply
    Bookmark Topic Watch Topic
  • New Topic