How to make a button laid out for a shortcut by pressing a button?
Button
Button btn = new Button();
Custom label
CustomLabel sp = new CustomLabel("Some texts here"));
Main panel
StackPane mainPane = new StackPane();
mainPane.getChildren.addAll(btn, sp);
At the same time, the area on which the user sticker is applied becomes unattractive.
In any case, so that the button is pressed, even if it is superimposed, for example? Or is there another way to do this? Something like setting a shortcut to invisible when clicked?
EDIT: Answer Itamar Green a question ..
Using an example, as shown in this link: Mouse events are ignored at a basic level , it still does not work. The button laid under the layer is still not available.
sp.setPickOnBounds(false);