Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

positioning frame...  RSS feed

 
karan, chopra
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i have a main frame say "a" and i am trying to show another frame say "b" from "a" by calling objectofframe"b".show()..now the frame "b" shows allright but my problem is that i want this frame "b" to be displayed at the center of frame "a",is there any way to go about it?ranchers plz advice..
regards
karan
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need to individual frames or could you maybe make a better application by opening a JInternalFrame. That way you could open a frame inside your current frame and center it.
I could show you some code it that would help and if you would like to use internal Frames.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Karen,
You could setup your Frame A as a component listener of Frame B. Inside your componentShown method you could perform the following:

Regards,
Manfred.
 
karan, chopra
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi manfred,
thanks a lot for the reply,actually i have never worked with components before,so can u please tell me how to make "frame a" a component listener of "frame b"..probably a piece of code would do the trick..i appreciate ur help..
regards
karan
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!