The problem is then I switch between panes, my buttons and text-fields become not visible, but then I drag cursor over components, they appear. My Hierarchy looks similar to this:
JFrame
- PanelWithComponents
- _Button3
- PanelWithPanels
- _PanelOne
- __Button1
- __Label1(Background)
- _PanelTwo
- __Label2(Background)
__Button2
private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) { if (jRadioButton1.isSelected()){ CardLayout cl = (CardLayout)(bottomPanel.getLayout()); cl.next(bottomPanel); }else{ CardLayout cl = (CardLayout)(bottomPanel.getLayout()); cl.next(bottomPanel); }
}