• 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 create model window

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all ,
i am aware that we can create modal dialog boxes .
can any buddy help me abt creating model window (or model JFrame)

thanks in advance ,
 
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
Hi "Sunny c9". Welcome to the ranch.
Take a look at JDialog and this dialog tutorial here
Is that what you are looking for?

As a side note, you need to change your display name to reflect your real name. You can do that by clicking here.
Also do take out time to read the NamingPolicy
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Maneesh Godbole:
As a side note, you need to change your display name to reflect your real name.

Thank you very much for noticing. I have recorded the incorrect naming.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way: Careful about spelling. Do you want model windows or modal windows?
 
Maneesh Godbole
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
Duh! Whats a "model" window? I was under the impression it was a typo and the OP meant modal.
 
sunny chg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Maneesh !!

my situation is like this suppose there is a one JFrame (suppose JFrame1) containning button ..while clicking button it will generete new JFrame.(JFrame2)
while closing JFrame1 , it will close both frames .... but i need to create modal frame which restrict to close frame one i.e. which insist to operate itself first ..
i.e. how to create that JFrame2 modal dialog

(.. hope i have clarified my need ...)
 
sunny chg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Campbell,
it was just spelling mistake i wanted to mean modal ...
 
Maneesh Godbole
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

Originally posted by sunny chougule:
.... but i need to create modal frame which restrict to close frame one i.e. which insist to operate itself first ..



Take a look at JOptionPane. It has numerous useful showXXXDialog methods which create modal windows. The link I gave previously has the details on how to use JOptionPanes.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Agree that JOptionPane is the easiest way to get a modal top-level container, but they are not actually Windows; they are JDialogs.

And thank you for correcting your displayed name.
[ July 22, 2008: Message edited by: Campbell Ritchie ]
reply
    Bookmark Topic Watch Topic
  • New Topic