Please,I'm new in JavaFx ,so go easy for me.I'm using a tableview in my Javafx Application.When there is no data,it displays NO CONTENT IN TABLE. I don't want to set any placeholder,I want at that place set empty rows instead. I tried to give empty values for the columns that contains String,but the Integer and Float Columns,I have to provide real values. This is what,I tried.In the Initialize method.I call this method
//Initialize second tableview instead of the message NO CONTENT IN THE TABLE
AddProductsForSale("","","",0f,new Inam());
and the AddProductsForSale method prototype is:
public void AddProductsForSale(String ref, String exp, String name, Float ppv,
Assurance iname)
Inside AddProductsForSale method,I set values for my tableView like that:
boolean find = false;
Sale s = new Sale();
s.setReference(ref);
s.setDesignation(name);
s.setDiscount(123);
s.setPpv(ppv);
s.setDiscount(0);
s.setExpiration(exp);
salelist.add(s);
t2_ppv.setCellValueFactory(new PropertyValueFactory<Sale, Float>("ppv"));
t2_discount.setCellValueFactory(new PropertyValueFactory<Sale, Integer>("discount"));
t2_qty.setCellValueFactory(new PropertyValueFactory<Sale, Integer>("qty"));
t2_reference.setCellValueFactory(new PropertyValueFactory<Sale, String>("reference"));
t2_designation.setCellValueFactory(new PropertyValueFactory<Sale, String>("designation"));
t2_expiration.setCellValueFactory(new PropertyValueFactory<Sale, String>("expiration"));
t2_ppv.setCellValueFactory(new PropertyValueFactory<Sale, Float>("ppv"));
t2.setItems(salelist);
But the problem is,the Column of String are empty but for other types as I provided real values,they are displayed.So,How Can I have rows without any values inside .Thank you so much.Excuse me for my English.