3
嗨我想在tablewView的列中的文本里面設置字體。我如何在Java中完成這是我的代碼。感謝幫助。更改JavaFX TableView的字體大小
private final TableView<AnotherBus> table = new TableView<>();
TableColumn busNumberCol = new TableColumn("Linia");
busNumberCol.setCellValueFactory(
new PropertyValueFactory<>("busNumber"));
busNumberCol.getStyleClass().add("Times New Roman,40");
tb.getStyleClass().add("Times New Roman");
TableColumn courseCol = new TableColumn("Kierunek");
courseCol.setCellValueFactory(
new PropertyValueFactory<>("nameBusStpo"));
courseCol.setPrefWidth(200);
courseCol.getStyleClass().add("Times New Roman");
TableColumn departureCol = new TableColumn("Odjazd");
departureCol.setCellValueFactory(
new PropertyValueFactory<>("busTimetable"));
table.setItems(list);
table.getColumns().addAll(busNumberCol, courseCol, departureCol);
table.setPlaceholder(new Label(
""));
您要更改單元格的顏色或列標題的顏色? – GOXR3PLUS
@ GoXR3Plus我想讓文字變大 –