Java examples for JavaFX:Tree
new JavaFX Tree Item
//package com.java2s; import javafx.scene.control.TreeItem; import javafx.scene.image.Image; import javafx.scene.image.ImageView; public class Main { public static <T> TreeItem<T> newTreeItem(TreeItem<T> parent, T value, Image image) {//from ww w . j av a 2 s . com final TreeItem<T> item = new TreeItem<>(value, new ImageView(image)); parent.getChildren().add(item); return item; } }