Read a file into an array:) but how do i get it to populate a selection box in JFrame
I have been working on reading a file and storing the contents into an array. However, as i have spent a bit of time doing this, i have come to a big problem how can i use it? I ideally want it to be read by an arraylist in another class ( Which is a class that creates the JFrame and its components) and be viewable and 'selectable' to the user via a selection box. Therefore when the file is read by the program the selection box is populated with values contained in the file read, which can then be selected.
My problem is the middle bit, how can/does it read from the array to the arraylist and then be displayed? I have coding ATM that all i do is change the string value names in the arraylist so that when you run the progam the selection box contains values, which i change to any name i want.