• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jFrame Closing Solution

 
sa sam
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have 1 jFrame(main frame) & in that i have menu bar. on every click event of menu item it will show you a a new jFrames(child frames).
now my problem is, i want the result like when i click on 1 menu item it will show me jFrame(child) but it do not allow me another click on menu item before closing jframe(child)
 
Rob Spoor
Sheriff
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a modal JDialog instead.
 
sa sam
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:Use a modal JDialog instead.

can you give me a example?
 
Rob Spoor
Sheriff
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose this is your second JFrame now:

You can simply change this to a JDialog as follows:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic