lundi 1 septembre 2014

JavaFx Set Tableview Cell Background Color Dynamically


Vote count:

0




I want to add color to the color cell of the rows dynamically when ADD button is clicked. I am not able to change the background color of the cell. Please see the image for reference. Am not able to achieve that with the help of code. Thanks for help in advance.


Snippet adding values to table :



@FXML
private void addEntity() {

data.add(new Inventory(codeTemp.getText(), articleNameTemp.getText(), Integer.parseInt(amountTemp.getText()), dcTemp.isSelected() ? true:false, stTemp.isSelected()?true:false, Utilities.toRGBCode(colorTemp.getValue()), informationTemp.getText(), data.size()+1));
inventoryTable.setItems(data);

}


enter image description here



asked 15 secs ago







JavaFx Set Tableview Cell Background Color Dynamically

Aucun commentaire:

Enregistrer un commentaire