query pane refactoring step 1

Please do not use listeners on buttons: instead write a method and use the `onAction` attribute in the fxml document.