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.
Here is a setup.
This is a JList extension that I have been using for years. I have packed
it with a JFrame for demonstration, that reads objects into an arrayList and
displays it in the selectable JList extension.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL