我想知道我可以使用哪个 CSS 类来为表格单元格列着色。 我想将列和单元格生成到 java 代码中。 我想要这样的东西:
."the class cell"
{
-fx-background-color:black;
}
谢谢大家
最佳答案
将样式类添加到 TableColum
。这会将样式类添加到该列的所有 TableCell
:
column.getStyleClass().add("colored-column");
.table-cell.colored-column {
-fx-background-color: black;
}
关于css - 我如何为 javafx 表列单元格应用 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51087199/