当前位置:   article > 正文

java在表格单元中加入button按钮_向TableView中的单元添加按钮(JAVAFX)

javafx tableview 添加按鈕

import java.util.function.Function;

import javafx.application.Application;

import javafx.beans.property.ReadOnlyObjectWrapper;

import javafx.beans.property.SimpleStringProperty;

import javafx.beans.property.StringProperty;

import javafx.beans.value.ObservableValue;

import javafx.geometry.HPos;

import javafx.geometry.Insets;

import javafx.scene.Scene;

import javafx.scene.control.Button;

import javafx.scene.control.Label;

import javafx.scene.control.TableCell;

import javafx.scene.control.TableColumn;

import javafx.scene.control.TableView;

import javafx.scene.control.TextField;

import javafx.scene.layout.BorderPane;

import javafx.scene.layout.ColumnConstraints;

import javafx.scene.layout.GridPane;

import javafx.scene.layout.Priority;

import javafx.stage.Modality;

import javafx.stage.Stage;

import javafx.stage.StageStyle;

public class TableViewWithEditButton extends Application {

@Override

public void start(Stage primaryStage) {

TableView table = new TableView<>();

table.getColumns().add(column("First Name", Person::firstNameProperty, 150));

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/191647
推荐阅读
相关标签
  

闽ICP备14008679号