Java Window app to count costs