今天研究FX中插入数据
先贴一段官方的ListView插入数据的方法
<p>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package swinginterop;</p><p>import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.control.cell.ComboBoxListCell;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;</p><p>public class ListViewSample extends Application {</p><p> public static final ObservableList data
= FXCollections.observableArrayList();</p><p> public static void main(String[] args) {
launch(args);
}</p><p> @Override
public void start(Stage primaryStage) {
prim