Results 1 to 6 of 6
  1. #1
    nabbster is offline Member
    Join Date
    Jun 2012
    Posts
    4
    Rep Power
    0

    Default Fill jList from class

    Hi guys,

    I have a question I hope I can be helped with. I am using Eclipes(running in vista) to program from - I hope this is ok. I have also added the google widowbuilder plugin.

    I have some knowledge of VBA and VB6 programming. I am a trial and error learner so sample codes are good for me as I will delete and modify the code constanly debuging the result. I have some web scraper code with reference to jSoup in a class called jDoit I have now added windowbuilder and have a form with a list(VB6 Listbox). Usually the I would loop through the scraper results using list.additem(VB6) how is this done in Java? can I do the same and reference the list from the jDoit class?

    Thanks in advance.

  2. #2
    nabbster is offline Member
    Join Date
    Jun 2012
    Posts
    4
    Rep Power
    0

    Default Re: Fill jList from class

    Ok I guess I have worded this in a bad way with 80 odd views and not a single answer. I clearly need to add some information but being this is my first post I am not sure what I have missed.

    Please some one reply even with questions so i may offer the correct information and get the reply I need?

    Thanks again

  3. #3
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,307
    Blog Entries
    7
    Rep Power
    20

    Default Re: Fill jList from class

    All I can say is have a look at the List interface and its implementations (ArrayList and LinkedList); if you're talking about a list you can visualize, have a look at the JList class.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    nabbster is offline Member
    Join Date
    Jun 2012
    Posts
    4
    Rep Power
    0

    Default Re: Fill jList from class

    Hi,

    Thanks for the reply. It is a jList GUI listbox I am trying to pupulate. What I can't seem to find examples of is how to fill it with the data from a scraper class I have created.

    Thanks again

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,755
    Rep Power
    19

    Default Re: Fill jList from class

    Where the data comes from is irrelevant.
    You just need to know what a JList expects, then provide it with that.
    So here's the JList tutorial.
    That should help you visualise what it needs, then you can turn the scraper data you have into something it can use (assuming you use a DefaultListModel) or write your own ListModel that accepts the scraper data as is.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  6. #6
    nabbster is offline Member
    Join Date
    Jun 2012
    Posts
    4
    Rep Power
    0

    Default Re: Fill jList from class

    Thank you for the link its got some very nice examples. Gotta do some serious reading now.

Similar Threads

  1. Replies: 4
    Last Post: 01-10-2012, 01:05 PM
  2. Link one JList to another JList
    By mib1bee in forum AWT / Swing
    Replies: 1
    Last Post: 12-31-2010, 07:10 PM
  3. Link one JList to another JList
    By mib1bee in forum Advanced Java
    Replies: 1
    Last Post: 12-30-2010, 06:35 PM
  4. Link one JList to another JList
    By mib1bee in forum New To Java
    Replies: 1
    Last Post: 12-30-2010, 06:24 PM
  5. How to Fill Arc in Java
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-23-2008, 11:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •