BorderLayout and getHeight/getWidth
I am running a code that uses border layout to manage 2 frames. One frame is a window in which I am displaying some graphics, located in the CENTER region. I have another frame in the SOUTH location which has keyboard listeners for various commands.
When I try to run the getHeight and getWidth commands in the SOUTH frame, it only gives me the values of the south frame. I would like to be able to call up the locations of the CENTER frame, but am not quite sure how to do it.
Re: BorderLayout and getHeight/getWidth
Are you using two separate frames for one window? In that case, you should use two JPanels and one JFrame instead--that way you have one top level container managing all of the components.
Otherwise, could you post code here and be a little more specific?
Re: BorderLayout and getHeight/getWidth
Thanks for the reply. What you said makes a lot of sense and I will definitely give it a try. I am pretty new to GUI and the layout stuff, and didn't even think of that.