I have a blank javafx.stage.Stage
with no icons minimize, maximize, and close stage.initStyle(StageStyle.UNDECORATED);
. I want to create them myself, because on the line with them will make more Buttons
. Because I use an empty style for the Stage
, I need to set a resizable borders for my window. There are standard ways to do this? Because to create them as a BorderPane
and customize the dragging of the mouse is cumbersome.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
I make resizable borders with mouse cursor position listener, it's work, I have not much time for optimized code:
Is this link a possible solution for what you require? How to bind stage resizing with resizing of components?
it is also possible that this link could work for you as well:
JavaFX: autoresize stage after adding child to root parent
The main line of code from the second link is
altered from a project of mine
This is how it looks
when maximised
package Project
Main.class
If you just copy the codes here, change
ResponsiveButton
to Button and remove theAnchorpane
ap` and its children, its classes are not added, but if you download the package project there is no problem.