Hi ,
I have created a submit button "sbutton" that should take all totals from 3 boxes and if that total is greater than 1, then it should be subtracted from 1 and the remainder is suppose to be displayed as change...this is what i have
public void actionPerformed(ActionEvent evt) { if(evt.getSource()==sButton){ change.setText(---"I DON"T KNOW WHAT TO PUT HERE") selections.setText("Vending....");
and in another class to add up the 3 totals i have
public String total5(){ total5=total+total2+total3+total4; String blank =new String(); blank="$"+total5; return blank; }
so my question is how do i use the total5 to compare if it's over 1 or less and display if it's over in the "change.setText( )" text box?