Resizing treeview icon
<p>It's a simple Javafx program code with an intention to have an icon in front of 
each node of tree view. The problem I face, I get way too bigger icon. How can I resize it to have same icon with all nodes? </p>

<pre><code>import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;

@FXML
TreeView&lt;String&gt; treeview;
@FXML
Image icon = new Image(getClass().getResourceAsStream("/image/folder.png"));

@SuppressWarnings("unchecked")
@Override
public void initialize(URL arg0, ResourceBundle arg1) {

    TreeItem&lt;String&gt; root = new TreeItem&lt;&gt;("root", new ImageView(icon));
    TreeItem&lt;String&gt; nodeA = new TreeItem&lt;&gt;("Node A", new ImageView(icon));
    TreeItem&lt;String&gt; nodeB = new TreeItem&lt;&gt;("Node B", new ImageView(icon));
    TreeItem&lt;String&gt; nodeC = new TreeItem&lt;&gt;("Node C", new ImageView(icon));
    TreeItem&lt;String&gt; nodeD = new TreeItem&lt;&gt;("Node D", new ImageView(icon));
    TreeItem&lt;String&gt; nodeA1 = new TreeItem&lt;&gt;("A1", new ImageView(icon));
    TreeItem&lt;String&gt; nodeA2 = new TreeItem&lt;&gt;("A2", new ImageView(icon));
    TreeItem&lt;String&gt; nodeB1 = new TreeItem&lt;&gt;("B1", new ImageView(icon));
    TreeItem&lt;String&gt; nodeB2 = new TreeItem&lt;&gt;("B2", new ImageView(icon));
    TreeItem&lt;String&gt; nodeC1 = new TreeItem&lt;&gt;("C1", new ImageView(icon));
    TreeItem&lt;String&gt; nodeD1 = new TreeItem&lt;&gt;("D1", new ImageView(icon));
    treeview.setRoot(root);
    root.getChildren().addAll(nodeA, nodeB, nodeC, nodeD);
    nodeA.getChildren().addAll(nodeA1, nodeA2);
    nodeB.getChildren().addAll(nodeB1, nodeB2);
    nodeC.getChildren().addAll(nodeC1);
    nodeD.getChildren().addAll(nodeD1);``

}
</code></pre>