Someone is going to need a reference to someone else, but you also want to maintain a level of separation so you don't end up tightly coupling your components together
You could use a controller of some kind, which has a reference to the table and is either listening directly to the buttons on the toolbar or which the tool bar can call and instruct it on what it wants to do.
For example, when clicked, the delete button would simply instruct the controller to "delete the selected rows". The controller would ask the TablePane
to "Delete the selected rows" and the TablePane
would comply.
This could be achieved through the Actions API where the Action
would act as the controller.
Basically you would create a new DeleteRowAction
(this is class you'd have to create), which had a reference to the TablePane
and which you would pass to the ToolBar
pane. You would then apply the Action
to the delete button (JButton#setAction
) and let it take care of everything else for you