Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cause TableView to not respond to mouse clicks in JavaFX 2.0

I want a JavaFX 2.0 TableView, but I don't want it to respond to mouse clicks. Of course, I can disable the control/widget but then it appears disabled.

tableview.setSelectionModel(null) gives the behavior I'd like, but the UI dumps stack traces complaining about the null. I can't catch the null.

I've been trying to create some kind of SelectionModel or TableViewSelectionModel that has some methods gutted, so it doesn't respond. I'm having a hard time extending these classes or implementing abstracts.

Ideas on disabling clicks on TableViews?

like image 855
Scott Serr Avatar asked Jan 30 '26 21:01

Scott Serr


1 Answers

tableView.setMouseTransparent(true)

like image 124
jewelsea Avatar answered Feb 02 '26 09:02

jewelsea



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!