Little More GUI Help?

Discussion in 'Java' started by SunDevil, Nov 5, 2006.

  1. SunDevil

    SunDevil

    Joined:
    Oct 29, 2006
    Messages:
    3
    Location:
    Hot Phoenix Arizona
    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;
    	}
    
     
    SunDevil, Nov 5, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BORG
    Replies:
    12
    Views:
    579
  2. Michael
    Replies:
    4
    Views:
    452
    Matt Hammond
    Jun 26, 2006
  3. ThaDoctor
    Replies:
    3
    Views:
    403
    Alan Woodland
    Sep 28, 2007
  4. Robert Klemme

    With a Ruby Yell: more, more more!

    Robert Klemme, Sep 28, 2005, in forum: Ruby
    Replies:
    5
    Views:
    229
    Jeff Wood
    Sep 29, 2005
  5. Daniel
    Replies:
    1
    Views:
    223
    Bart van Ingen Schenau
    Jul 9, 2013
Loading...

Share This Page