This program is for a school assignment. Here are the requirements:
Write a Java application that effectively uses Java collections to store pairs of unique colors and their unique hexadecimal values. For example, “Red” - “FF0000”. Store at least 8 and up to 20 of these pairs. For example, create a method like “buildColors” that returns an appropriate Java collection populated with at least 8 colors.
Then write a GUI that displays the hexadecimal values using radio buttons to select a value. When selected the background of the GUI should change to that color. The GUI should iterate over the collection to build the radio buttons dynamically; that is, you should only hard code the addition of the colors to the collection but not when building the radio buttons for the UI. That is, if the number of colors in the collection were changed from 10 to 15 in the “buildColors” method, the rest of the UI code and application would function appropriately without requiring a code change.