void (final Component component) { String id = myComponentToIdMap.get(component); if (id == null) { id = addStepComponent(component); myContentPanel.revalidate(); myContentPanel.repaint(); } ((JBCardLayout)myContentPanel.getLayout()).swipe(myContentPanel, id, myTransitionDirection); }