Bind column to multiplication of other columns
<p>I would like to bind amount column to price and quantity columns such that everytime either quantity or price, amount updates.</p>

<pre><code>    import javafx.application.Application;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.TableColumn;
     import javafx.scene.control.TableColumn.CellEditEvent;
     import javafx.scene.control.TableView;
     import javafx.scene.control.cell.PropertyValueFactory;
     import javafx.scene.control.cell.TextFieldTableCell;
     import javafx.scene.layout.HBox;
     import javafx.scene.layout.VBox;
     import javafx.scene.text.Font;
     import javafx.stage.Stage;
     import javafx.util.converter.NumberStringConverter;

   /**
    *
    * @author Yunus
    */
public class ColumnBinding  extends Application{
   private TableView&lt;Product&gt; table = new TableView&lt;Product&gt;();
   private final ObservableList&lt;Product&gt; data = FXCollections.observableArrayList();
   final HBox hb = new HBox();

public static void main(String[] args) {
    launch(args);
}

@Override
public void start(Stage primaryStage) throws Exception {
    Scene scene = new Scene(new Group());
    primaryStage.setTitle("Book Store Sample");
    primaryStage.setWidth(650);
    primaryStage.setHeight(550);

    final Label label = new Label("Testing");
    label.setFont(new Font("Arial", 20));

    table.setEditable(true);

    TableColumn priceCol = new TableColumn("Price");
    priceCol.setMinWidth(100);
    priceCol.setCellValueFactory(
            new PropertyValueFactory&lt;Product, String&gt;("price"));
    priceCol.setCellFactory(TextFieldTableCell.&lt;Product, Number&gt;forTableColumn(new NumberStringConverter()));
    priceCol.setOnEditCommit(
            new EventHandler&lt;CellEditEvent&lt;Product, Number&gt;&gt;() {
                @Override
                public void handle(CellEditEvent&lt;Product, Number&gt; t) {
                    ((Product) t.getTableView().getItems().get(
                            t.getTablePosition().getRow())
                    ).setPrice(t.getNewValue().intValue());
                }
            }
    );

    TableColumn quantityCol = new TableColumn("Quantity");
    quantityCol.setMinWidth(200);
    quantityCol.setCellValueFactory(
            new PropertyValueFactory&lt;Product, Number&gt;("quantity"));
    quantityCol.setCellFactory(TextFieldTableCell.&lt;Product, Number&gt;forTableColumn(new NumberStringConverter()));
    quantityCol.setOnEditCommit(
            new EventHandler&lt;CellEditEvent&lt;Product, Number&gt;&gt;() {
                @Override
                public void handle(CellEditEvent&lt;Product, Number&gt; t) {
                    ((Product) t.getTableView().getItems().get(
                            t.getTablePosition().getRow())
                    ).setQuantity(t.getNewValue().intValue());
                }
            }
    );

    TableColumn amount = new TableColumn("Amount");
    amount.setMinWidth(200);
    amount.setCellValueFactory(
            new PropertyValueFactory&lt;Product, String&gt;("amount"));

    data.addAll(new Product(10, 12, 120),
                new Product(20, 12, 240),
                new Product(30, 12, 360),
                new Product(40, 12, 480),
                new Product(50, 12, 600));
    table.setItems(data);
    table.getColumns().addAll(priceCol, quantityCol, amount);
    final VBox vbox = new VBox();
    vbox.setSpacing(5);
    vbox.setPadding(new Insets(10, 0, 0, 10));
    vbox.getChildren().addAll(label, table, hb);

    ((Group) scene.getRoot()).getChildren().addAll(vbox);
    primaryStage.setScene(scene);
    primaryStage.show();
}

public static class Product{
    Product(){}

    public Product(float quantity, float price, float amount) {
        this.quantity = quantity;
        this.price = price;
        this.amount = amount;
    }

    private float quantity;
    private float price;
    private float amount;

    public float getQuantity() {
        return quantity;
    }

    public void setQuantity(float quantity) {
        this.quantity = quantity;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public float getAmount() {
        return amount;
    }

    public void setAmount(float amount) {
        this.amount = amount;
    }


}
 }
</code></pre>

<p>The challenge though is not to change POJO class(Product) with property fields</p>