JAVAFX: Calling a Method inside another Method which is linked to a Button Action in Scene Builder
Created Following Functions/Methods; public void AddBill() {} public void AddtoCart() {} public void getLastBill() {} public void LoadCustomerByID() {} Then is Created a Method to Run All above Methods with if Condition; public void BillandCart(ActionEvent event) throws Exception{ Connection connect = SqliteConnection.Connector(); if(BillNbr.getText() == null){ AddBill(); getLastBill(); LoadByCustomerID(); CalculateBillPrice(); AddtoCart(); }else{ CalculateBillPrice(); AddtoCart(); } Now this Method public void BillandCart(ActionEvent event) throws Exception doesn't work when is link it to On Action Button BillNbr in Scene Builder. But When i Run the Methods individually AddBill; AddtoCart(); getLastBill(); LoadCustomerByID(); works well. Need Help.