Skip to content

Instantly share code, notes, and snippets.

@rlf89
rlf89 / DragResizerXY.java
Last active August 10, 2019 05:26 — forked from andytill/DragResizer.java
DragResizerXY can be used to add mouse listeners to a Container and make it resizable by the user by clicking and dragging the border in the same way as a window.
import javafx.event.EventHandler;
import javafx.scene.Cursor;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.VBox;
/**
* {@link DragResizerXY} can be used to add mouse listeners to a container
* and make it resizable by the user by clicking and dragging the border in the
* same way as a window.
*