I have a JPanel
which is a BorderLayout
and I have set a new panel in the top and container (JDesktopPane
) in center and another panel in bottom. Now I want to set panel (card layout) dynamically in center of container as I am showing hierarchy below
top --> panel
panel(BorderLayout)center --> container(JDesktopPane) --> panel(CardLayout)
bottom --> panel
Here card layout contain different panel as card. problem is that I'm unable to show each card in center of container.