I have the following code:
TabPaneBuilder.create()
.tabs(
TabBuilder.create()
.text("Main")
.closable(false)
.build(),
TabBuilder.create()
.text("Preview")
.content(createPreviewSplitMenu())
.closable(false)
.build()
)
.build()
Is it possible to add a listener here so that something is done when the tab "preview" is selected? If so I can't seem to find it and I have looked at the API.
I'm not asking how to do it in general, just when using TabPaneBuilder.
Thanks.
Edit: would also like the simplest regular way to do it if what I am asking is not possible.
Edit2: what I'd like to do is have the content of "Preview" tab redrawn when it is selected.
You need to add the listener to the TabBuilder!
(Need to give it a name first, so you can reference it later:)