资源简介
TableView修改表格行颜色,定制表格
代码片段和文件信息
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableRow;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.stage.Stage;
import javafx.util.Callback;
public class CustomTable extends Application
{
public void start(final Stage stage) throws Exception
{
stage.settitle(“So called friends . . .“);
ObservableList data = FXCollections.observableArrayList();
data.addAll(new Friend(“longc“ “Movie Ticket“ true)
new Friend(“Irene“ “Pay Raise“ false)
new Friend(
评论
共有 条评论