Easy Java Swing exercise: Tip calculator
Single-purpose calculators are frequently used as exercises for Java beginners. The instructor tasks the students with writing a command line program that calculates the area of a room in square feet, or it calculates body mass index (BMI), or it converts an amount of money in one currency to another, etc.
To do the same thing with a graphical user interface (GUI), such as with Java Swing…