GUI Fuel Calculator

So I am trying to create a GUI where a user can enter the date, amount of fuel filled up, distance travelled and amount spent. Then from this data the average fuel per 100km is calculated as well as the average for the past 5 days. I donít really know where to start. I have designed the GUI and added the buttons in eclipse. However Iím unsure of how to write the code to store the data and make the calculations? Any suggestions?
Thanks!