Little More GUI Help?

Joined
Oct 29, 2006
Messages
3
Reaction score
0
I have an initialize in my UI, and I am trying to read in a file of already existing videos from my video manager below. So when I start my GUI the list should be populated in the GUI. Any ideas? Where am I going wrong?

Code:
public void initialize() 
{
    myList.setListData(VideoManager.getInstance().getVideos().toArray());
    int size = myList.getModel().getSize();
}

and my Video Manager:

Code:
public List getVideos() 
	{
		if (videos == null) 
		{
			videos = new ArrayList();
			inFile = new Scanner("/home/VideoFile.csv");
			while ( inFile.hasNextLine())
			{
			 line = inFile.nextLine();
			 System.out.println(line);
			 Scanner tokens = new Scanner(line);
			}
			inFile.close();
		}
		return videos;
	}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top