Hi,

This doesn't quite make sense to me, the Left and Right have a resize
cursor, and neither of those are set as draggable. I guess it's because of
their height/placement. E.g., see left versus right (Label versus HBox) in
slightly tweaked code.

E.g.:

[image: curs.gif]

So this brings me to another problem. We don't want some nodes to be
draggable, such as the MenuBar. Because if it is, we end up with this:

[image: menu.gif]

And if you make it *non-draggable*, you lose the resize cursor (in
IntelliJ, you get both non-drag behaviour, and resize cursor above the
menu). It seems very confusing and non-intuitive; this relationship between
dragging options and seeing a resize cursor and how they're incompatible
re: the menu example.

public class MenuCursorIssue extends Application {
    public static void main(String[] args) { launch(args); }

    @Override
    public void start(Stage primaryStage) {

        MenuBar menuBar = new MenuBar();
        final Menu file = new Menu("File");
        file.getItems().addAll(new Menu("New"), new Menu("Open"));

        menuBar.getMenus().addAll(file, new Menu("Edit"));

        Region region = new Region();
        HBox.setHgrow(region, Priority.ALWAYS);
        // HeaderBar.setDragType(menuBar, HeaderDragType.DRAGGABLE_SUBTREE);

        HeaderBar.setDragType(region, HeaderDragType.DRAGGABLE_SUBTREE);
        HBox menuHbox = new HBox(menuBar, region);

        final HeaderBar headerBar = new HeaderBar();
        headerBar.setCenter(menuHbox);

        primaryStage.initStyle(StageStyle.EXTENDED);
        primaryStage.setScene(new Scene(new BorderPane(new Label("center"),
headerBar, null, null, null), 600, 400));
        primaryStage.show();
    }
}





Kind Regards,
Cormac

On Thu, 1 Jan 2026 at 21:41, Michael Strauß <[email protected]> wrote:

> Hi Cormac,
>
> that's not a bug: On Windows, the top resize border is inside of the
> window, while the other three resize borders are outside of the window. You
> only get a resize cursor if the area below the cursor is draggable, which
> your green HBox is not. If you make it draggable, then you'll also get a
> resize cursor. This is by design, as the resize border shouldn't overlap
> client elements (in our case, elements that are not draggable).
>
> The fact that you get a resize cursor for the top edge of the red label
> looks like it may have something to do with the fact that it's a label, but
> in reality the label is just placed close enough to the top edge of the
> window so that the resize border extends a tiny bit over the label (which
> is draggable).
>

Reply via email to