To do this you can put frames into each of the bands, setting their size to fill the band completely. Then set the borders on the frames to replicate a border around all three bands, so the header has a border at the top, left and right; the footer has bottom, left and right; and the detail band has a border only on the left and right. See the example code below.
<columnHeader>
<band height="61" splitType="Stretch">
<frame>
<reportElement x="0" y="0" width="555" height="61"/>
<box>
<topPen lineWidth="2.0" lineStyle="Solid"/>
<leftPen lineWidth="2.0" lineStyle="Solid"/>
<rightPen lineWidth="2.0" lineStyle="Solid"/>
</box>
</frame>
</band>
</columnHeader>
<detail>
<band height="125" splitType="Stretch">
<frame>
<reportElement x="0" y="0" width="555" height="125"/>
<box>
<leftPen lineWidth="2.0" lineStyle="Solid"/>
<rightPen lineWidth="2.0" lineStyle="Solid"/>
</box>
</frame>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch">
<frame>
<reportElement x="0" y="0" width="555" height="45"/>
<box>
<leftPen lineWidth="2.0" lineStyle="Solid"/>
<bottomPen lineWidth="2.0" lineStyle="Solid"/>
<rightPen lineWidth="2.0" lineStyle="Solid"/>
</box>
</frame>
</band>
</columnFooter>
The result should look like this:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…