File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes arrays and arraylist and Vectors oh My Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "arrays and arraylist and Vectors oh My" Watch "arrays and arraylist and Vectors oh My" New topic

arrays and arraylist and Vectors oh My

Mikealan Smith

Joined: Aug 29, 2003
Posts: 15
I'm working on a little project and need a little guidance.
This is a GUI project using SWT, but the SWT is not where i'm having problems.
I have my UI in 1 class called Project7UI and my database code in another class called Project7DB
I have a owner, team and player class.
Here is what i'm trying to accomplish. I have a list box that i load for example with Owner information. When the user selects on a Owner, i'm tring to load a table with related information about the team and players.
I've got the list box loaded fine. I'm returning from the project7DB an array of Owners and then loading my listbox. So far so good.
Now i need to run a sql statement to get the team, player info for selected owner. i've got the SQL but i'm not sure what i need to do return this back from project7db to project7ui. i presume i will create a owner instance, team instance and multiple player instances, but i'm not sure how to get it all back to the caller.
Any ideas will be appreciated.
James Clinton
Ranch Hand

Joined: Jun 23, 2003
Posts: 190
If you are wishing to load the data for team, player info into a table. Sun provide a brill example, see in your J2 install dir.
Hope this helps.
I agree. Here's the link:
subject: arrays and arraylist and Vectors oh My
jQuery in Action, 3rd edition