src/Controller/AddProductController.java
/**
     * * Add Button Handler adds the selected part in the Add Parts table view
     * to the current list of Associated Parts that belong to the product. If no
     * part is selected then an error will be thrown.
     *
     * @param event
     */
Add Button Handler adds the selected part in the Add Parts table view
to the current list of Associated Parts that belong to the product. If no
part is selected then an error will be thrown.

@param event
Add Button Handler adds the selected part in the Add Parts table view to the current list of Associated Parts that belong to the product . If no part is selected then an error will be thrown . @param event
@FXML
    private void addBtnHandler(ActionEvent event) {
        boolean noActiveSelection = addTable.getSelectionModel().isEmpty();
        Part selectedPart = addTable.getSelectionModel().getSelectedItem();
        if (noActiveSelection) {
            System.err.println("No part selected. Part cannot be added to product's associated parts list.");
            Alert noPartSelected = new Alert(Alert.AlertType.WARNING);
            noPartSelected.setTitle("ERROR: NO PART SELECTED");
            noPartSelected.setHeaderText("No part has been added to product's part list.");
            noPartSelected.setContentText("A part must be selected before it can be added to the part list.");
            noPartSelected.showAndWait();
        }
        System.out.println(selectedPart + " successfully added to product's associated parts list.");
        Product.addAssociatedPart(selectedPart);
        updateDeleteTable();
    }
@ FXML private void addBtnHandler ( ActionEvent event ) { boolean noActiveSelection = addTable . getSelectionModel ( ) . isEmpty ( ) ; Part selectedPart = addTable . getSelectionModel ( ) . getSelectedItem ( ) ; if ( noActiveSelection ) { System . err . println ( "No part selected. Part cannot be added to product's associated parts list." ) ; Alert noPartSelected = new Alert ( Alert . AlertType . WARNING ) ; noPartSelected . setTitle ( "ERROR: NO PART SELECTED" ) ; noPartSelected . setHeaderText ( "No part has been added to product's part list." ) ; noPartSelected . setContentText ( "A part must be selected before it can be added to the part list." ) ; noPartSelected . showAndWait ( ) ; } System . out . println ( selectedPart + " successfully added to product's associated parts list." ) ; Product . addAssociatedPart ( selectedPart ) ; updateDeleteTable ( ) ; }
* Add Button Handler adds the selected part in the Add Parts table view
 to the current list of Associated Parts that belong to the product.
* Add Button Handler adds the selected part in the Add Parts table view to the current list of Associated Parts that belong to the product .