I'm doing an assignment where we have to use mapping with GUI to do a simple Country and Capital search. The user inputs the Country, and Capital, then pushes the add button and it adds those to the map. After being added, they can search for the Country with the search box. It's hinted at that I should use a Map instance to store the values, and to name that instance countries. Once the user inputs the Country they are searching for in the search field, it will highlight that countries capital amongst the other capitals in the list on the right. I'm very lost on how to begin this. I have the gui complete, but the coding behind the other part is what baffles me, I'm not sure how to begin.
This is what my gui looks like.
Also, how do I get rid of those Item 1, Item 2 and so on by default?
Any help is appreciated, I'm just really stuck right now.