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

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top