This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Java in General and the fly likes Matching HashMap Key To Value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Matching HashMap Key To Value" Watch "Matching HashMap Key To Value" New topic

Matching HashMap Key To Value

henri henri
Ranch Hand

Joined: Oct 03, 2005
Posts: 115
Hello, I am trying to write a program that stores information about film titles in JavaBean components. When a user clicks on a button with a letter from A to Z, the letter is fed to the setFilmData() method where a list of all the film titles beginning with that letter are retrieved. I am unsure of how to match the keys with the corresponding values. Please see the link which has a screenshot of the user interface. I would like the data in each JavaBean to end up in the JTable you see in the program.

Kevin Davies

Joined: Jun 20, 2005
Posts: 14
Where are the values being kept? It seems like it would be most logically to keep them in a TreeMap and not use the TreeSet at all. In the map you could just call
henri henri
Ranch Hand

Joined: Oct 03, 2005
Posts: 115
The values are stored in a HashMap along with keys which are the film titles. Once I have the title, I need the corresponding Bean to extracted the encapsulated information about the film. I am creating the software for an illiterate person, so I need to make it as intuitive and easy as possible for this particular user.
Have you checked out Aspose?
subject: Matching HashMap Key To Value
It's not a secret anymore!