when try code below list isn't populated specific arrays please i'm pretty new coding gui in netbeans
private void bookinglistjcbactionperformed(java.awt.event.actionevent evt) { for(int = 0;i<datasource.getbookinglist().size();i++){ bookings tempbooking = datasource.getbookinglist().get(i); boolean tempfinish = tempbooking.getfinish(); string tempmechanic = tempbooking.getmechanic(); string tempclerk = tempbooking.getclerk(); string tempservice = tempbooking.getservice(); if(tempfinish == true){ bookinglistjcb.additem(tempbooking); mechanicjtf.settext(tempmechanic); serivececlerkjtf.settext(tempmechanic); servicejtf.settext(""+tempservice ); finishjtf.settext(""+tempfinish); } } // todo add handling code here: } here bookings class how don't know why combo box isn't displaying anything
public class bookings { private string vehicle; private string clerk; private string service; private string mechanic; private boolean finish; public bookings() { } public bookings(string vehicle, string clerk, string service, string mechanic, boolean finish) { this.vehicle = vehicle; this.clerk = clerk; this.service = service; this.mechanic = mechanic; this.finish = finish; } public string getvehicle() { return vehicle; } public void setvehicle(string vehicle) { this.vehicle = vehicle; } public string getclerk() { return clerk; } public void setclerk(string clerk) { this.clerk = clerk; } public string getservice() { return service; } public void setservice(string service) { this.service = service; } public string getmechanic() { return mechanic; } public void setmechanic(string mechanic) { this.mechanic = mechanic; } public boolean getfinish() { return finish; } public void setfinish(boolean finish) { this.finish = finish; } @override public string tostring() { return "bookings{" + "vehicle=" + vehicle + ", clerk=" + clerk + ", service=" + service + ", mechanic=" + mechanic + ", finish=" + finish + '}'; } }
Comments
Post a Comment