Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javafx.scene.layout.Border;
import javafx.scene.layout.BorderStroke;
import javafx.scene.layout.BorderStrokeStyle;
import javafx.scene.layout.BorderWidths;

import javafx.scene.layout.Region;
import javafx.scene.paint.Color;

public class Main {
    /**
     * Utility method to temporarily add a visible border around a region.
     *
     * @param region
     *            The region getting the border.
     * @param color
     *            the color of the border.
     */
    public static void addDummyBorder(final Region region, final Color color) {
        region.setBorder(new Border(new BorderStroke(color, BorderStrokeStyle.SOLID, null, new BorderWidths(5)))); // MAGIC_NUMBER
    }
}