How do u create a 2-dim. vector with a for loop(two for's) ?

JTable is such a pain in the ass sometimes... you see i don't have a predifined number of elements to be stored in the JTable... so i have to pass a Vector[][] but i don't know how to create one in two for loops...
Vector v[][] = new Vector[][];
for(int i = 0; i< v.size(); i++){
for (int j=0; j<v.size(); j++){
v[i][j] = { "" + (u+1) , ((Team)c.get(array[u])).getName()),
intoString(((Team)c.get(array.getPlayed()))),
intoString(((Team)c.get(array[u].getHomeWins()))),
intoString(((Team)c.get(array[u])).getHomeDraws()),
intoString(((Team)c.get(array[u])).getHomeLosses()),
intoString(((Team)c.get(array[u])).getHomeFor()),
intoString(((Team)c.get(array[u])).getHomeAgainst()),
intoString(((Team)c.get(array[u])).getAwayWins()),
intoString(((Team)c.get(array[u])).getAwayDraws()),
intoString(((Team)c.get(array[u])).getAwayLosses()),
intoString(((Team)c.get(array[u])).getAwayFor()),
intoString(((Team)c.get(array[u])).getAwayAgainst()) ,
intoString(((Team)c.get(array[u])).getPoints()) } ;
It doesnt work this way because my layout in JTable later needs to be like this....
uuuuuu uuuuuuuuuuuuuu uuuuuuuuuuuu uuuuuuuuuu
666666 66666666666666 666666666666 6666666666
777777 77777777777777 77777777777 7777777
.. and so and so... do u follow me ??
Please help me if you can ....

I might still be mising the point but here goes.
According to the API ( http://java.sun.com/j2se/1.3/docs/api/index.html ) for JTable, the appropriate constructor is:
public JTable(Vector rowData, Vector columnNames)
I'm assuming that the JTable should have one column for each of the items - Name, Played, HomeWins etc. I'll also assume there is an array of Team objects containing the data (if I'm wrong the code should be easy to adjust).
The columnnames Vector is self-explanatory - add a String object for each column.
For rowData, you need a Vector of Vectors.
e.g
Vector rowData = new Vector[teamArray.length];
for (int k = 0; k < teamArray.length; k ++) {
  Vector oneRow = new Vector();
  Team team = teamArray[k];
  oneRow.add(team.getName());
  oneRow.add(team.getPlayed());
  oneRow.add(team.getPoints());
  rowData[k] = oneRow;
JTable table = new JTable(rowData, columnNames);

Similar Messages

  • How do i create/combine my mac id with my iPhone id?

    i wanted to download an app form app store and was asked for my id.. apperntly my iPhone id is limited to my country's app store and my email is in use for that id... how do i create/combine my mac id with my iPhone id so i can download apps from appstore?

    The Apple ID for the iTunes stores and for the Mac App Store are the same account. You can only buy from the stores in the countries in which you have the qualifications. You must have a bank card in that country and the bank card must have a valid billing address in that country. Creating more than one Apple ID is a bad idea and will not help you get around the requirements.

  • How do I create an email list sign up form for my iWeb website?

    Well that's the question - how do I create an email list sign up form for my iWeb website?
    Could someone tell me what's the simplest way using iWeb to create an interactive option
    for users to enter their email address and the info be forwarded to me so I can add to an
    email list?
    It would be great if, since I'm using a Mac computer & iWeb, there was a way to have the
    submitted emails automatically added to a group in my Mac Addressbook.
    I got this MacBook Pro in Sept 2010 so I believe that's iWeb '08 I'm using.
    Anyway I'm thinking there should be a way to do this with some system involving an HTMK
    Widget and an email account.
    By the way this is for hosting through a 'real server', not MobileMe (which I plan to get later
    when I can afford it).
    Any help or suggestions would be appreciated.
    Mark

    Website forms require some code in a snippet and a formmail.php script on the server to process the form and send the info to the required email address. You can do all this when you switch to a "real" server.
    In the meantime you can use a form  or marketing service or, better still, an application like MailShoot which generates the form, handles the database and sends out the bulk emails.
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • How do I create an interactive PDF file with variable data

    We would like to basically do a 'mail merge' of our list of customers with an interactive PDF file (including videos, menus, etc - not just form fill out and web links) to create a single PDF file that contains multiple mail pieces ... one for each customer ... with each mail piece being customized for that customer.  Customizations would include different greetings (Dear Bob, Dear Dana, etc), as well as different charts based on data unique to the customer, different photographs, etc.
    I've seen that InDesign and Acrobat Professional can be used to create an interactive PDF (such as from http://tv.adobe.com/watch/ask-the-adobe-ones/14-calling-rufus-about-interactive-pdf-making).  However I don't understand how I can insert data from a database, csv file, excel file etc into the PDF file so that each page, or each set of pages, within the PDF can be customized.
    Can anyone point me to a tool to use for this?
    Thanks,
    Bob Kendall

    For that kind of volume and unattended operation, you want InDesign Server – which is the server/high volume edition of INDD.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 3 Nov 2011 06:58:07 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How do I create an interactive PDF file with variable data
    Re: How do I create an interactive PDF file with variable data
    created by Ti26E31DSxxx<http://forums.adobe.com/people/Ti26E31DSxxx> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/4005459#4005459

  • How do I create an after effects file with an interchangeable image

    Hey,
    hope someone can help me, I'm using after effects to create a mp4 file, it contains a photo which has a animation super imposed ontop of it.
    When the projects finished the base photo that the animation is created around could change up three times a day.
    What I'm trying to work out is a way for a non technical user to just be able to upload the new photo to somewhere and for the animation to be created and returned somehow to him so that the animator doesn't have to re open and edit the affect effect project each time a new photo comes in.
    Is there a way to do this built into after effects does any one know?
    Thanks for any help

    For that kind of volume and unattended operation, you want InDesign Server – which is the server/high volume edition of INDD.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 3 Nov 2011 06:58:07 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How do I create an interactive PDF file with variable data
    Re: How do I create an interactive PDF file with variable data
    created by Ti26E31DSxxx<http://forums.adobe.com/people/Ti26E31DSxxx> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/4005459#4005459

  • How can I create a new entry without using LOV for foreign keys.

    Referring to TUHRA sample application based on HR database schema. JDeveloper 10.1.3.0.4
    How can I create a new employee without using LOV for the foreign key "job_id".
    On the first page I would like to choose the job_title from adf read-only table.
    After clicking on the "create new employee button" a creation form appears in which the job_id field is set with previous selection.
    Regards M.Winkler
    Edited by: user3541283 on 06.10.2008 03:44
    Edited by: user3541283 on 06.10.2008 03:50

    Hi,
    usually the foreign key is only set if the VO you select is dependent from a master. If e.g. you have DepartmentsVO1 that has an EmployeeVO3 as its nested VO, then creating a new instance of employees automatically add the foreign key. If you add EmployeesVO1, which is not dependent to DepartmensVO1, then the foreign key is not set. So if this is the case in THURA (keep in mind that this is not an Oracle demo but a sample used in a book about ADF) then all you need is to take the independent VO when building the new employee form.
    Frank

  • How can I create a new TC backup with ethernet, so I don't have to wait two days for a new wireless backup?

    How can I create a new TC backup with ethernet, so I don't have to wait two days for a new wireless backup?
    Several times in the last year, I've gotten a message that Time Machine needs to completely redo my backup. Using the wireless connection, this takes almost two days. Is there a way to do the backup with ethernet and then switch back to wireless? Thanks.

    May I know what is needed to make sure the MacBook is able to see Time Capsule on ethernet?
    Connect an Ethernet cable from one of the LAN <-> ports on the 2Wire gateway to the WAN port (circle of dots icon) on the Time Capsule.
    If AirPort Utility cannot "see" the Time Capsule now, you will need to perform a "hard reset" by holding in the reset button for 7-8 seconds or so and then reconfigure the Time Capsule. You can use the same Time Capsule name and password, etc. as before.
    Configure the Time Capsule to "Create a wireless network" and select the Bridge Mode option when it appears during the setup using AirPort Utility.
    Once the Time Capsule is configured, restart the entire network again. Power down everything, start the 2Wire first and then start each other device after that one at a time about a minute apart.
    Now you can connect your Mac directly to one of the LAN <-> ports on the Time Capsule for the backup using another Ethernet cable. In general, about 20-25 GB per hour will transfer.
    The Time Capsule will broadcast a much faster wireless network than the 2Wire can provide, so you might want to leave the setup "as is" for awhile after the first backup is complete. If you decide to use the Time Capsule as your main wireless access point, you would want to turn the wireless off on the 2Wire since two wireless networks in close proximity can create interference problems.
    Or, if you want to use the wireless on the 2Wire, you could turn off the wireless on the Time Capsule. Then backups will occur over the 2Wire wireless, or over Ethernet.
    I don't really recommend the "Join a wireless network" setting on the Time Capsule for most users, but you could go back to that setup as well if you want after the first backup is complete.

  • How do I create a PDF fillable form with adobe pro 10

    How do I create a PDF fillable form with adobe pro 10

    You need to open the "Tools" panel and select the "Forms" category to access all the tools for creating form fields.
    TOP 10 coolest new Acrobat XI features
    Form tutorials

  • How to read some images from file system with webdynpro for abap?

    Hi,experts,
    I want to finish webdynpro for abap program to read some photos from file system. I may make MIMES in the webdynpro component and create photos in the MIMES, but my boss doesn't agree with me using this way. He wish me read these photos from file system.
    How to read some images from file system with webdynpro for abap?
    Thanks a lot!

    Hello Tao,
    The parameter
       icm/HTTP/file_access_<xx>
    may help you to access the pictures without any db-access.
    The following two links may help you to understand the other possibilities as well.
    The threads are covering BSP, but it should be useful for WebDynpro as well.
    /people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
    http://help.sap.com/saphelp_sm40/helpdata/de/c4/87153a1a5b4c2de10000000a114084/content.htm
    Best regards
    Christian

  • How can I create a new Care Plan with one or more care tasks

    Hello,
    I'm working on a Dutch website in the HealthVault Environment. I got difficulties in creating and updating a careplan with care tasks. Most likely it's due to lack of knowledge...
    Following code works fine:
    CarePlan plan = new CarePlan();
    plan.Name = "test";
    this.PersonInfo.SelectedRecord.NewItem(plan);
    It creates a plan called [test]. But I don't know how to create a plan with one or more tasks in it: the tasks property is read only.
    https://msdn.microsoft.com/en-us/library/microsoft.health.itemtypes.careplan.tasks.aspx
    Half a year ago I was able to add an example of a careplan, which was a feature of the dev tools, but for some reason that's not possible anymore.
    https://developer.healthvault.com/DataTypes/Overview?TypeId=415c95e0-0533-4d9c-ac73-91dc5031186c
    So my question is, how can I add a new care plan with a task like the example from the HealthVault dev tools:
    <tasks>
    <task>
    <name>
    <text>Run 100 miles</text>
    </name>
    <description>Run 100 miles in 6 months</description>
    <start-date>
    <structured>
    <date>
    <y>2013</y>
    <m>12</m>
    <d>1</d>
    </date>
    </structured>
    </start-date>
    <end-date>
    <structured>
    <date>
    <y>2014</y>
    <m>6</m>
    <d>1</d>
    </date>
    </structured>
    </end-date>
    <target-completion-date>
    <structured>
    <date>
    <y>2014</y>
    <m>12</m>
    <d>31</d>
    </date>
    </structured>
    </target-completion-date>
    <sequence-number>279128532</sequence-number>
    <recurrence>
    <interval>
    <text>Once</text>
    </interval>
    <times-in-interval>10</times-in-interval>
    </recurrence>
    <reference-id>p01vil21ckg7k2346y1g60337mmi20sg564l321l8pmpqev39n302572sewu76lh9019s3993e02924</reference-id>
    </task>
    </tasks>
    Any help is welcome 
    Wilfred

    Hi Wilfred,
    Have you tried this?
    CarePlan plan = new CarePlan();
    plan.Name = "test";
    plan.Tasks.Add(someTask) 
    If you have a task list already, you would need to enumerate through it and add one by one...
    foreach (var task in existingList)
        plan.Tasks.Add(task)

  • How can I create unique partnerships to deal with like EDI messages?

    I have an EDI to Application partnership setup currently that deals with translating MEDRUC type EDIFACT messages to a mainframe format. The setup is
    Sender = PARTNERA,
    Receiver = PARTNERB
    DocType = MEDRUC.
    In the Input EDI tab the
    Sender Qualifier ID = ZZ:PARTNERA
    Receiver Qualifier ID = ZZ:PARTNERB
    Standard = EDIFACT
    Version = D
    Release Number = 97B.
    Use UNG to locate partnerships = No
    EDIFACT messages contain all this information in their UNB and UNH segments which is where SunONE IS B2B looks to then match against the relevant partnership. My problem is this does not go to enough granularity for me to distinguish uniqueness for the second partnership I need to create.
    The problem is the "Association assigned code" field in the UNH for EDIFACT messages is not catered for anywhere in the partnership details area. This means then that whilst my existing partnership deals with Simplified Billing Claim MEDRUC's which is Association assigned code = SBC20, I can't create an EDI to Application partnership for PARTNERA and PARTNER B to cater for Two Way Gap Claiming MEDRUC's which are Association assigned code = TWC10, ie the two messages are D97B MEDRUC type messages only distinguished from each other by this Association assigned code.
    Any ideas how can I then create a unique EDI to Application partnership for this TWC10 MEDRUC message?
    What I am thinking I will have to do is make this second partnership Application to Application and create a custom service to wrap the MEDRUC message with a HREC/TREC and use the parameters in the HREC to dictate the DocType rather than use the UNB/UNH segments in the MEDRUC?

    Hmmm. It looks like way back when the decision was made on how specific the keys had to be, they didn't get quite specific enough for your case. I'm not super experienced with EDIFACT but I'll throw out some suggestions based on my HREC and X12 knowledge.
    A. Could you handle both instnaces through the same partnership, but alter the map to create unique outputs based on the two different types? At least of the cards would need to be handled through Route, but you could have that picked up by a simple Outprep / Gateway Service list that put the data where you wanted it.
    B. Before Parse, run a custom service that is capable of inspecting for which type of data it is, then modify one of the key fields in place to find the Second partnership. Really getting adventurous, maybe you could alter keys in the UNG to make the distinction. This assumes that you don't have both types of documents in the same interchange.
    C. Your idea may be workable. Can you give some more detail on the make-up of the Service list and the destination/processing of the two differnt types of MEDRUC?
    Thanks.

  • How can i  create and access resource file(with .res ext) in j2me

    hi,
    i am developing an mobile international application using jsr-238 an optional api to implement the idea of internationalizationand localization.
    please tell me how can i create .res files in my application to store strings of different languages.thanks inadvance.

    Hello GG RA,
    which fileformat do you want to use (binary or ASCII)?
    There are some LabVIEW shipping examples for File I/O
    You could use the LabVIEW NI Example Finder (Help --> Find Examples..(search item "file")) to get an overview about the different file-formats in LabVIEW.
    Hope this helped out and feel free to reply if you have more questions about File I/O in LabVIEW
    Best regards
    Benjamin

  • How do I create a new paragraph Style in Pages for iPad?

    I opened an RTF document in iOS 6 Pages for iPad. How do I create new paragraph Syles?

    Style is a function of the template applied to the document (and/or the limited number built in to Pages). You can mofify the text or apply one of the built in styles, but I do not beleive within Pages in iOS you can create a new style.
    http://help.apple.com/pages/ipad/1.6.1/

  • How do I create multiple midi tracks each with separate external synthesizer sound

    Mac Pro OS 10.10.2, Logic Pro 10.1.1, FireFace 800 (updated), Roland XP-30 synthesizer/keyboard, Mackie mixer.
    XP-30 analog output to Mackie, FireFace monitor to FireFace main inputs and FireFace out to Mackie.
    What I can't get to work: Sound output for monitoring as I record on each of several midi tracks, each with access to my banks/programs.
    Logic automatically set up the multi-instrument and created 16 tracks, visible in the mixer window. I have entered custom banks for the XP-30 and they are working.
    Mt problem is two parts. First, my last experience was with Logic Pro 7 way back.
    Problem two is that when I create midi tracks (except for the first one I created on channel 1) by control-clicking on one of the tracks in the mixer window I get no sound for monitoring. I can see the green monitor indicator for the track shows midi data incoming. I just can't hear it. It's as if there is no designated output. I have checked audio preferences and see the FireFace as input and output device. If i change the channel to channel 1, I get the sound, but then I have two tracks on channel 1 which doesn't work for designating unique sounds to each track.
    I can select "All" for channel and get monitored sound on several tracks; however, they then all play the same sound, of course.
    i can create midi tracks (either instrument or external) using the plus icon, but no matter how i set them up that way, they do not allow me access to my banks/programs.
    In logic Pro 7 it was no problem creating multiple midi tracks, each with a different sound assigned to it. In Logic Pro 10, I am baffled regarding how to accomplish this and get it all to work as simply and nicely as I was able to with #7.
    Make sense? Can anyone help?
    Thanks

    I have it set to Performance mode which according to the owners manual: "This mode makes the XP-30 function as a multitimbral sound
    source, and Performance settings can be modified. If you’re
    using an external MIDI device to control the XP-30 in this
    mode, it will function as a multitimbral sound source."

  • SharePoint Designer 2013 (2010 Platform Workflow) - How can I create a new list item with a SPECIFIC content type?

    In SharePoint 2010 I created workflows that used the 'Create list Item' Action, which then set the Content Type ID (so I could create documents of various types in a document library). 
    We just switched to the SharePoint 2013 platform, and now the drop down for Content Type ID is blank in all of the workflows that are still using the SharePoint 2010 platform.  Is there any way to create a list item with specific content
    type?  Even if I could just input a string into that field instead of using this blank drop-down.  Please help! 

    Hi Sarah,
    According to your description, my understanding is that you cannot create a new list item with a specific content type using SharePoint 2010 Platform Workflow.
    I tested the same scenario in my environment, and the Create List Item worked fine with the specific content type.
    How did you create the content type?
    Please check if the content type is added to the list/library the workflow associated with.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

Maybe you are looking for

  • Runtime error in extractor enhancement

    Hi, I need to enhance the extractor 0WBS_ELEMT_ATTR with an additional field. The field is a Z field from the table PRPS. Now PRPS is a base table for the extractor for this extractor, so simply adding this field into the append structure should suff

  • How to sort on category id using categorization schema in SAP CRM 7.0

    All, Currently we are using categorization modeler within CRM7.0 for complaint transactions. It seems that the sortation with respect to the categories which have been defined within a categorization schema, is based on the date that the categories w

  • How to find out what is populating a table

    I have a table in oracle 10g, I checked the dba_source to find out if a procedure or package is population this table, however, I couldn't find it. How can I get the name of a form or other source that can populate the table. Oracle is on window Xp.

  • Bug in Datafinder Queries?

    I worked with datafinder and multi-queries functions in LabVIEW 2009 sp1. No problem. By some reasons, I changed the data format of TDMS. Each channel (ch0... chN) of a group has the time information of acquisition marked with the same name of DateTi

  • Mac mini won't bootup

    I was proceeding with an update of our EFI Firmware to our 2nd Mac mini that our organization owns( the first Mac mini, I had no problem with the update) and when it went to restart the light goes on in the front panel and that's it. Nothing on the m