How do I search an array from a different class?
I have an array I want get grab information from. I've successfully got the array populated by reading in an Excel spreadsheet. The array is in its own class Players.java.
My array has 6 columns (elements?) and contains Player ID (key), Name, Rating, Games, Wins, Losses. I want to change some labels in a GUI when someone selects the player name from a Listbox.
When someone clicks on a name in the text box, their statistics (Rating, Games, Wins, Losses) get displayed in the UI. I already have some dummy text changing when someone clicks on a name from the list. I know how to get the value of the name selected in the list using getSelectedValue(). My problem is getting the values out of the array that is contained in a different class. I know how to search the array even... my problem is accessing it.
QUESTION: How do I read from the array in a different class?
I've been stuck on this problem for several days and have been searching for answers and just setting it aside while I worked on a different part of the program. But now I'm at a point where I'm pretty much stuck until I figure this out.