Skip to content

Tag: events

JavaFX event on Mouse Wheel Finished for ScrollPane

I have a ScrollPane with lots of elements on it, (Same one as this JavaFX setHgrow / binding property expanding infinitely) and initially I was planning on using the setOnScrollFinished(this::scrollFinished); event, however I’ve now discovered through research that this only applies to touch gestures, and trying to find a compromise for the MouseWheel hasn’t been great and I just find

Does Java have native support for events, similar to that of C#?

I’m a bit confused from what I’ve heard Java doesn’t do events. But I know that it does GUI events. Am I missing something? Does java have an event handling mechanism? I’m aware that I can implement a publisher subscriber pattern, but I’m looking for native support within Java. I seem to remember something about Java Adding events in either