I'm not sure if this deserve a question but here it is.
If I have some Class, let's say
public class myClass{
Button btn = new Button;
btn.setOnMouseEvent(myHandler);
Text txt = "hello";
}
Now if the user triggers the event I'll execute some code in myHandler. In there i need to access the txt variable but I only have a reference to the button via event.getSource().
So how can I obtain a reference to the class containing the object beeing returned by event.getSource()?
Edit : Ideas about the title are also welcome!