Is it possible to have a HBox
with a close button (i.e. a child button with the purpose of removing the HBox
)? I am planning to implement it into something like this:
I want to make a class of my own that inherits from the HBox
class and has a close button already once it is instantiated. The close button needs to remove the HBox
from the parent of the HBox
(in this case, the VBox
parent), not hide it. But I'm not sure if it is possible.
If it is possible, how should setOnAction
of the close button be implemented?