Create a GUI application that can be is used to convert a distance unit in miles into its corresponding units in kilometer, meter, inches and centimeter. When a user enters a mile value in a text field and followed by pressing a button, its equivalent values in unit of kilometer, meter, inches and centimeter will be displayed in the corresponding text fields. If the user enters the value of miles that is less or equals to zero, a dialogue error message that contains a message “The value must be greater than zero” will be displayed.
The formula for each of unit conversion is as follows:
1 mile = 2.5 km
1 km = 1000 m
1 meter = 60 inches
1 inches = 2.54 m