Skip to content

Instantly share code, notes, and snippets.

View cannibalsticky's full-sized avatar

Cannibalsticky cannibalsticky

View GitHub Profile
@cannibalsticky
cannibalsticky / DragResizerXY.java
Last active January 6, 2021 10:12
DragResizerXY can 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 are both working.
import javafx.event.EventHandler;
import javafx.scene.Cursor;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Region;
/**
* {@link DragResizerXY} 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.
* <p>