Example 9

Conversion

 

Use three supplied text files to create objects that hold arrays of measurement names and an array of conversion ratios. Use the measurement name arrays to populate two combo boxes. One holds the units you are converting from and the second holds the units you are converting to. Create three radio buttons. These radio buttons determine which units of measure you are converting between. When you click a radio button, the combo boxes should be repopulated with the new measurement names, and the input and output text fields should be cleared of any data. When a convert button is clicked, or the return key is pressed while in the input text field, the conversion calculation should be performed and the results put into the output text field.