• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make a JFrame Modal to another JFrame????[urgent....]  RSS feed

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a JFrame with some components,when a Button is clicked I want to display a JFrame with a TextArea containing some text.I want this popup Frame to be modal to the previously vicible JFrame.Could this be done using JFrame or any other suggestions?
Happy middling with java. :
Netharam. :roll:
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There's that urgent thing again ...
No can do with Frames. Modal only applies to Dialog. Use a dialog for the popup.
Regards,
Manfred.
 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Leo I can't connect regularly to the net ,moreover I'm developing a small utility in java & should finish off within a week & I'm also new to swing thats why I post it urgent.I will just check the replies immediately when I'm online itself.I'll try to avoid it in future.
Thanks for u'r reply.
Happy middling with java. :
Netharam. :
 
vinaya kumar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One Method is to to Pass the JFrame to Calling JFrame.
Other method is use dialogs.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!