I have TableView and I want my program to doSomething() when user clicks on a cell. After searching on Internet (stackoverflow included), I found this.
Tried that method, but I got a compile error on these code :
EventHandler click = new EventHandler() {
public void handle(MouseEvent t) {
System.out.println("CLICKED");
}
};
NetBeans asked me to override all abscract method, so I did it.
EventHandler click = new EventHandler() {
@Override
public void handle(MouseEvent t) {
System.out.println("CLICKED");
}
};
Still got same error :
error: method does not override or implement a method from a supertype
If I remove @Override annotation, I got :
error: <anonymous pengamatan.penginderaan.FXMLDocumentController$4> is not abstract and does not override abstract method handle(Event) in EventHandler
Any help? Thank you.