• Post Reply Bookmark Topic Watch Topic
  • New Topic

Remove Mouse Listener from JavaFx Label  RSS feed

 
Akila Sachitra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am a beginner in javafx.

i want to remove mouse listener in JavaFx Label

In java swing we have method like this >> Jlabel.removeMouseListener( )


i want to do same thing in JavaFX Label
 
John Damien Smith
Ranch Hand
Posts: 337
21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you added your listener using setOnClicked(listener), you can remove it using setOnClicked(null).

If instead you used addEventHandler, then you can remove it using removeEventHandler.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!