67,512
社区成员
发帖
与我相关
我的任务
分享
SlideShow slideShow = new SlideShow();
Slide slide = slideShow.createSlide();
Table table = new Table(2,2);
TableCell cell = table.getCell(0, 0);
RichTextRun richTextRun = cell.createTextRun().getRichTextRuns()[0];
richTextRun.setText("aaaaaaaaaaaaaaaaaaaaaaaaaaa\r\nbbbbbbbbbbbbbbbbbbbbbbbbb");
richTextRun.setFontColor(Color.gray);
cell = table.getCell(0, 1);
richTextRun = cell.createTextRun().getRichTextRuns()[0];
richTextRun.setText("jjjjj\r\nuuu");
richTextRun.setFontColor(Color.yellow);
Line border = table.createBorder();
border.setLineColor(Color.red);
border.setLineWidth(2);
table.setAllBorders(border);
table.setColumnWidth(0, 100);
table.setColumnWidth(1, 100);
table.setRowHeight(0, 100);
table.setRowHeight(1, 100);
slide.addShape(table);
table.moveTo(10, 10);
FileOutputStream fos = new FileOutputStream("e:/a.ppt");
slideShow.write(fos);
fos.close();