Skip to content

Instantly share code, notes, and snippets.

View strazovan's full-sized avatar

David Stražovan strazovan

View GitHub Profile
@strazovan
strazovan / DragResizer.java
Last active October 6, 2017 10:57 — forked from andytill/DragResizer.java
DragResizercan be used to add mouse listeners to a Region and make it resizable by the user by clicking and dragging the border in the same way as a window. Height and width resizing implemented.
package javafxdragresize;
import javafx.scene.Cursor;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Region;
/**
* {@link DragResizer} can be used to add mouse listeners to a {@link Region}
* and make it resizable by the user by clicking and dragging the border in the
* same way as a window.