Results 1 to 6 of 6
Thread: Fill jList from class
- 06-10-2012, 02:21 PM #1
Member
- Join Date
- Jun 2012
- Posts
- 4
- Rep Power
- 0
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.
- 06-11-2012, 08:33 PM #2
Member
- Join Date
- Jun 2012
- Posts
- 4
- Rep Power
- 0
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
- 06-11-2012, 08:40 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,408
- Blog Entries
- 7
- Rep Power
- 17
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,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 06-12-2012, 12:37 PM #4
Member
- Join Date
- Jun 2012
- Posts
- 4
- Rep Power
- 0
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
- 06-12-2012, 01:01 PM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
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.
- 06-12-2012, 09:27 PM #6
Member
- Join Date
- Jun 2012
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Help with JList selection showing values on another JList
By SpO0KIe in forum AWT / SwingReplies: 4Last Post: 01-10-2012, 01:05 PM -
Link one JList to another JList
By mib1bee in forum AWT / SwingReplies: 1Last Post: 12-31-2010, 07:10 PM -
Link one JList to another JList
By mib1bee in forum Advanced JavaReplies: 1Last Post: 12-30-2010, 06:35 PM -
Link one JList to another JList
By mib1bee in forum New To JavaReplies: 1Last Post: 12-30-2010, 06:24 PM -
How to Fill Arc in Java
By Java Tip in forum java.awtReplies: 0Last Post: 06-23-2008, 11:14 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks