ScrollBar scrollBar1= (ScrollBar)TableView1.queryAccessibleAttribute(AccessibleAttribute.HORIZONTAL_SCROLLBAR);
ScrollBar scrollBar2 = (ScrollBar)TableView2.queryAccessibleAttribute(AccessibleAttribute.HORIZONTAL_SCROLLBAR);
if(null!=scrollBar1&&null!=scrollBar2){
scrollBar1.valueProperty().bindBidirectional(scrollBar2.valueProperty());
}
感谢作者:
https://blog.csdn.net/qq_38132283/article/details/108002096
使我学习了queryAccessibleAttribute方法。