im working on a song manager for an assignment. ive gotten the program to store every mp3's artist and song name into two respective arraylists. then i display the contents of these array lists in two J-Lists, one named artists and another named songs.
so say I have a folder containing just madonna songs and say she has 5 songs:
madonna - a
madonna - b
madonna - c
madonna - d
madonna - e
where the letters represent songs. whats happening right now is it stores each madonna song just fine since they are different names, however for the artist JList the madonna is repeating 5 times since its being stored in the array list 5 times, since my program is finding her name 5 times. how can I get it to store madonnas name only once, so that under my artist JList her name appears only once. obviously under the artists i want each artists name appearing only once, regardless of how many songs they have.
thanks in advance
you have to made arraylist to arraylist
ArrayList madonna = new Arr...
ArrayList singer = new Arr...