It should be static but it's not.

So just

page.setPaperSize( page.A4_PAPERSIZE);


-----Original Message-----
From: yangontha Maung [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 31, 2003 2:15 AM
To: POI Users List
Subject: RE: Footer

Hi,

I have downloaded the 2.0RC version and tested. Footer
can be done as required.

However, I have another question. I want to set up the
page as A4 size paper. From the API documentation I
found that

public final short A4_PAPERSIZE=9;

in HSSFPrintSetup class.

I tried to use like this
HSSFPrintSetup page = sheet.getPrintSetup();
page.setPaperSize((short) 9);

It can set the size as A4 paper. But instead of using
the number 9, I want to use A4_PAPERSIZE. But when I
use it as

page.setPaperSize(HSSFPrintSetup.A4_PAPERSIZE);
there is an error
non-static variable A4_PAPERSIZE cannot be referenced
from static context.

Please help.

rgds,






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to