Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javafx.scene.Node;

import javafx.scene.layout.Pane;

public class Main {
    /**
     * Utility method to remove a node. In particular, a full pane can be removed.
     *
     * @param node
     *            The node to be removed.
     */
    public static void remove(final Node node) {
        if (node.getParent() != null && node.getParent() instanceof Pane) {
            ((Pane) node.getParent()).getChildren().remove(node);
        }
    }
}