Removing the CENTER element from a JPanel using BorderLayout
20,828
Something like this?
BorderLayout layout = (BorderLayout)panel.getLayout();
panel.remove(layout.getLayoutComponent(BorderLayout.CENTER));
Author by
Evan Fosmark
Updated on July 09, 2022Comments
-
Evan Fosmark almost 2 years
Is there any way of removing the
Component
added to theCENTER
of aJPanel
with aBorderLayout
, without having to reference theComponent
itself?