테이블 배열 (2 테이블)을 만들려고합니다. nullpointer 예외가있는 마지막 행에서 프로그램이 멈 춥니 다. 왜 그런가?PdfPTables 배열 [] 채울 때 nullpointer 예외
com.lowagie.text.pdf.PdfPTable[] table = new com.lowagie.text.pdf.PdfPTable[1];
// the cell object
com.lowagie.text.pdf.PdfPCell cell;
// header
cell = new PdfPCell(new Phrase(wdComponentAPI.getMessage("Ordernr")));
cell.setColspan(1);
cell.setBackgroundColor(Color.LIGHT_GRAY);
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table[0].addCell(cell);
작품을 작성하기 전에 객체를 생성하고 할당해야합니다. 응답 주셔서 감사합니다 – user3414861
@ user3414861 여러분을 환영합니다! – A4L