2017-09-15 27 views
1

在創建自定義表,按照這些步驟,代號一個邊界問題

if(row < 0) 
{ 
    cell.getAllStyles().setPadding(1, 1, 5,5); 
    cell.getAllStyles().setBorder(Border.createEmpty(), true); 
} 

我嘗試使用上面的代碼刪除第一行的邊框,但它不是工作,我預期,但試圖改變字體顏色使用

cell.getAllStyles().setFgcolor(ColorUtil.Blue); 

上面的代碼工作正常嗎?你能幫我解決這個問題嗎...

回答

1

在你的setBorder()調用中失去true參數。例如。

cell.getAllStyles().setBorder(Border.createEmpty()); 
1

我實現它實現了通過

table.setInnerBorderMode(Table.INNER_BORDERS_ROWS); 

,消除列邊境和邊境僅排