String aNameArray[] = { "Introduction", "page one", "page two", "page three", "page four",
"page five", "page six", "page seven", "page eight", "page nine" };
int i;
for ( i = 0; i < 10; i++ )
{
XDrawPage xDrawPage = (XDrawPage)UnoRuntime.queryInterface(
XDrawPage.class, xDrawPages.getByIndex( i ));
XNamed xPageName = (XNamed)UnoRuntime.queryInterface(
XNamed.class, xDrawPage );
xPageName.setName( aNameArray[ i ] );