I have a JFrame
with CardLayout
that contains 2 JTappedPane
components and 2 JPanel
and a side panel with buttons to control switching between panels in the card layout, my problem is when I switch between panels the size of the window changes and shows gaps and I don't know why.
I solved that by setting both the minimum size
and the preferred size
of my jPanels
and jTappedPanes
to the exact size of the parent card layout
and unchecked the horizontal resizing
and vertical resizing
for each one of them.