<xal xmlns="http://openxal.org/ui/java">
  <macro:macro xmlns:macro="http://openxal.org/core/macro" name="showCard">
    <xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
      <xm:set-attribute select="id(''cardPaneID'')">
        <xm:attribute name="show" value="{0}"/>
      </xm:set-attribute>
    </xm:modifications>
  </macro:macro>  
  <borderPane height="300px" width="500px" horizontalGap="12px" verticalGap="11px">
    <gridPane height="300px" width="500px" borderPosition="center" horizontalGap="12px" verticalGap="11px" columns="1" evenlySpace="false">
      <cardPane height="200px" width="500px" id="cardPaneID" show="card1" padding="10px">
        <gridPane id="card1" height="200px" width="500px" cardName="card1" caption="Card 1" borderColor="#C0C0C0" borderStyle="solid" borderWidth="1px" columns="2" >
          <label text="Label:" /> 
          <textField height="25px" text="This textField is on card1..." width="200px"/>
        </gridPane>
        <gridPane id="card2" height="200px" width="500px" cardName="card2" caption="Card 2" borderColor="#C0C0C0" borderStyle="solid" borderWidth="1px" columns="3">
          <label text="Label:"/>
          <textField height="25px" text="This textField is on card2..." width="200px" />
        </gridPane>
      </cardPane> 
      <horizontalFlowPane horizontalGap="12" verticalGap="11">
        <button height="25" text="Show Card 1" onCommand="macro:showCard.execute('card1')"/>
        <button height="25" text="Show Card 2" onCommand="macro:showCard.execute('card2')"/>
      </horizontalFlowPane>
    </gridPane>
  </borderPane> 
</xal>