g.drawString("For an item costing " + itemCost + " pence", 20, 20); g.drawString( "The change required for the " + amountTendered + " pence is " + (amountTendered - itemCost), 20, 40);