As @brano suggested, you can access those components via the LayoutManager
of your JFrame
's contentPane
.
For exemple, assuming that you want to get the component that is located on BorderLayout.WEST
(and that your JFrame
is called frame
), you could do:
final BorderLayout layout = (BorderLayout) frame.getContentPane().getLayout();
final Component west = layout.getLayoutComponent(BorderLayout.WEST);
One remark, though: the getLayoutComponent
method doesn't belong to LayoutManager
: thus, you have to know and be sure that your layout
is an actual BorderLayout
.