Sure, you can do in docx4j what you can do in Word.
In Word, its table properties > row > repeat as header at the top of each page
Using the Docx4j Helper Word AddIn, you can see you need the following on your row (tr):
Using xml Syntax Highlighting
<w:tr >
<w:trPr>
<w:tblHeader/>
</w:trPr>
Parsed in 0.000 seconds, using
GeSHi 1.0.8.4
The AddIn generates the following code:
Using java Syntax Highlighting
// Create object for trPr
TrPr trpr
= wmlObjectFactory.
createTrPr();
tr.
setTrPr(trpr
);
// Create object for tblHeader (wrapped in JAXBElement)
BooleanDefaultTrue booleandefaulttrue
= wmlObjectFactory.
createBooleanDefaultTrue();
JAXBElement
<org.
docx4j.
wml.
BooleanDefaultTrue> booleandefaulttrueWrapped
= wmlObjectFactory.
createCTTrPrBaseTblHeader(booleandefaulttrue
);
trpr.
getCnfStyleOrDivIdOrGridBefore().
add( booleandefaulttrueWrapped
);
Parsed in 0.014 seconds, using
GeSHi 1.0.8.4