setInsideBorders and setOutsideBorders are mutually exclusive, you are supposed 
to call one of them, not both.
To set custom inside+outside borders you need to set cell borders explicitly:

        for(int i = 0; i < row ;i++) {                                          
                                             
                for(int j = 0 ; j < col ; j++) {
                        
                        TableCell cell = table.getCell(i, j);
                        cell.setText(strings[j]);
                        cell.setVerticalAlignment(TextShape.AnchorTop);
                        cell.setHorizontalAlignment(TextShape.AlignLeft);
                     if(i == 0) {
                        cell.setBorderLeft(thickBorder);
                     } else if (i == row -1) {
                        cell.setBorderRight(thickBorder);
                     } else {
                        cell.setBorderLeft(thinBorder);
                     }
                     .....


                }
        }

See how setInsideBorders and setOutsideBorders are implemented:
http://svn.apache.org/repos/asf/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Table.java

Yegor

Hi Yegor,

I needed to create a table in ppt with thick outer border and thin inner
border.
I tried to set the borders as follows but the borders were not created
properly.(i.e left outer border is not displayed and inner border is not
displayed for some of the table cells).
The output sample is attached.

        Table table = new Table(row, col);
        
        Line line = new Line();
        line.setLineColor(Color.black);
        line.setLineStyle(Line.LINE_SIMPLE);
        line.setLineWidth(Line.LINE_DOUBLE);

        Line OuterLine = new Line();
        OuterLine.setLineColor(Color.black);
        OuterLine.setLineStyle(Line.LINE_SIMPLE);
        OuterLine.setLineWidth(Line.LINE_TRIPLE);
                

        table.setInsideBorders(line);
        table.setOutsideBorders(OuterLine);     
        
        for(int i = 0; i < row ;i++) {                                          
                                             
                for(int j = 0 ; j < col ; j++) {
                        
                        TableCell cell = table.getCell(i, j);
                        cell.setText(strings[j]);
                        cell.setVerticalAlignment(TextShape.AnchorTop);
                        cell.setHorizontalAlignment(TextShape.AlignLeft);
                }
        }

        slide.addShape(table);
http://www.nabble.com/file/p20701212/Q308%2BMCD%2BReviews_%2BMBD1.ppt
Q308+MCD+Reviews_+MBD1.ppt


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

Reply via email to