This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remove Mouse Listener from JavaFx Label

 
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: 298
14
  • 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