SwingDeck extends AbstractSwingContainer implements XulDeck { public void setSelectedIndex( int index ) { int previousVal = selectedChildIndex; selectedChildIndex = index; cardLayout.show( container, "" + index ); this.changeSupport.firePropertyChange( "disabled", previousVal, index ); } SwingDeck( Element self, XulComponent parent, XulDomContainer container, String tagName );  SwingDeck( XulComponent parent, String tagName, Orient orient ); @Override void addChild( Element ele ); int getSelectedIndex(); void setSelectedIndex( int index ); void layout();  }
@Test public void testSetSelectedIndex() throws Exception { assertEquals( deck.getSelectedIndex(), 0 ); deck.setSelectedIndex( 1 ); assertEquals( deck.getSelectedIndex(), 1 ); }