Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

[iText-questions] Display the background color of nested tables

Chiu Penny

2005-05-23


I create a nested table, for example:

Table table1 = new Table(2);
table1.setBackgroundColor(new Color(0, 0, 255));
table1.addCell("1");
table1.addCell("2");
table1.addCell("3");
   
Table table2 = new Table(2);
table2.setBackgroundColor(new Color(0, 255, 0));
table2.addCell("4");
table2.addCell("5");
table2.addCell("6");
table2.addCell("7");
   
Cell cell = new Cell(table2);
table1.addCell(cell);

I hope the color of table1 is blue, and the color of table2 is green.
I use setBackgroundColor method to set the background color of table,
but only table1 is blue, table2 is also blue, not green. Please help
me, thanks!

(The attach file contains I wanted effect)
µL¼ÐÃD¤å¥ó
1 2
3
4 5
6 7
©2008 junlu.com - Jax Systems, LLC, U.S.A.