0 Replies Latest reply on Jun 19, 2020 4:44 PM by 4273914

    How to display combo box from database ?

    4273914

      Hi All,

       

      I have a category table, contains categoryid & categoryname

      category.PNG

      I want to display combo box category in  ProductMsFXML.fxml

       

      I have Category Class like this

       

      categoryClass.PNG

      In the file ProductMsFXMLController.java, I coded like this below

       

      initalizeProductMs.PNG

      categoryList.PNG

       

      I want the program display CategoryName in cboCategory combo box, but when I selected the combo box, I can save the categoryid in the table ProductMs. How to do that ?

      Currently when I  run for the input menu ProductMs, the combo box doesn't display CategoryName.

       

      CategoryCombo.png

       

      .Regards,

       

      Sentoso