网上资料比较少,找了好长时间,在gitee中淘出了一位大神的代码,效果还不错
package DragDrop;
import java.util.function.Function;
import javafx.application.Application;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableRow;
import javafx.scene.control.TableView;
import javafx.scene.input.ClipboardContent;
import javafx.scene.input.DataFormat;
import javafx.scene.input.Dragboard;
import javafx.scene.input.TransferMode;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class TableViewDragRows extends Application {
private sta

本文介绍了一个使用JavaFX实现的可拖拽行的表格视图示例,通过自定义TableView来支持行之间的拖放操作,使得用户可以方便地重新排列表格中的数据。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



