If you change total method to return a number:
double getTotal()
{
return (total+total2+total3+total4);
}
You can then use it in your event handler:
if(evt.getSource()==sButton)
{
double total = obj.getTotal();
if (total < 1)
{
change.setText("Not enough");
return;
}
change.setText("Change $" + (total-1);
selections.setText("Vending....");
}