1

I have a class called MyPane extends from javafx.scene.layout.Pane and now I want to add my own event (like in C# delegate).

In C# I would do it like this:

public delegate void MyOwnHandler(string message);

public event MyOwnHandler Click;

to call the event:

Click("Hello events");

I hope someone can help me to understand the event, listener and handle stuff in java.

Mohammed Noureldin
  • 14,913
  • 17
  • 70
  • 99
Finki
  • 184
  • 1
  • 1
  • 9

0 Answers0