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
  • 12,127
  • 14
  • 68
  • 86
Finki
  • 174
  • 1
  • 1
  • 9

0 Answers0