Please Help With A Loop Using Vectors?

I am developing a swing application and this loop has me completly stumped I have not worked with vectors alot, nut I have never seen this happen in a loop before:
I am just going to post the loop because that is where this problem is happening.
What I want to do is loop through CAT X amount of times and
have an inner loop for SUBCAT X amount of times.
fs is a formattedString class I have and eventually this text is appended to a JTextArea.
Here is the Loop:
Vector CAT = new Vector();
Vector SUBCAT = new Vector();
CAT = getCategories(Department);
for (int i=0; i<CAT.size(); i++){
String Category = CAT.elementAt(i).toString();
fs.append("\nCategory: ",11);
fs.append(Category,65);
SUBCAT = getSubCategories(Category);
}//End CATEGORY
The part where I am completely stumped is, if I comment out the SUBCAT= part then the Text displays fine. If I dont it will just display the first string in the CAT Vector I have done a try and catch to see if there is an exception being thrown but there is none. The getSubCategories() method works fine b/c it is working at other parts of my program. (It Returns a Vector BTW). So commenting it out should really make no difference.
Can anyone help me with this????
Thanks in advance

I will post what my output is in each scenario and maybe you can better understand what I am explaining:
SCENARIO 1::::::::::::::::::::::::::::
for (int i=0; i<CAT.size(); i++){
fs.append("\nCategory: ",11);
fs.append(CAT.elementAt(i).toString(),65);
}//End CATEGORY
Category: A Collars
Category: Access Door
Category: Aluminum
Category: Anchors Drop In
Category: Bits
Category: Blades
Category: Bolts, Nuts, Pins and Rivets
Category: Bolts, Nuts, Pins, and Rivets
Category: Canvas Connection
Category: Caps
Category: Caulking
Category: Copper
Category: Duct Mate
Category: Ells
Category: Flat Bar
Category: Flex Duct
Category: Galvanized
Category: Grills
Category: Insulation
Category: Iron
Category: Miscellaneous
Category: Pipe
Category: Reducers
Category: Return Air Panels
Category: Rings
Category: Rod
Category: Slide Gates
Category: Spin Ins
Category: Stainless Steel
Category: Stick On With Damper
Category: Tape
Category: TDC
Category: Tees
Scenario 2:::::::::::::::::::::::::::::::::
Category: A Collars
for (int i=0; i<CAT.size(); i++){
fs.append("\nCategory: ",11);
fs.append(CAT.elementAt(i).toString(),65);
SUBCAT = getSubCategories(CAT.elementAt(i).toString());
}//End CATEGORY
Now do you see:
The SUBCAT = getSubCategories(CAT.elementAt(i).toString()); should not be affecting the loop. It should just be assigning a new Vector to SUBCAT. I know that it is missing the inner loop in this example, but this is how I found out the loops where not working right.

Similar Messages

  • Please help with importing and using imovie and idvd

    Hi,
    Please forgive my lack of knowledge. I previously had a mini dv camcorder that was so easy to use with imovie hd. Now that I have switched to an HD Usb 2.0 camcorder that has built in 16gb memory and memory cards, I have had such a great deal of trouble. I really hope you can help and point me in the right directions.
    Importing movies are fine, but they take so long! Currently, when I import a movie, I set the camcorder to PC mode and import through imovie. But the camcorder stays on, and I'm not sure if this is the best way or healthiest for the camcorder. Do you have a better/faster way to import movies? Is there a way to drag the video from the memory onto the computer, and then from there import the movie? I think at least I wouldn't have to leave the camcorder on.
    Also, one major issue I have is that each movie is broken down into 100 or so clips. I coach basketball, and videotape the games. When there is stoppage, I pause the camcorder. I guess that creates so many clips, so that when the film is imported, there are over 100 clips for the entire movie. Is there a way of making that just 1 entire movie/clip?
    Once I have imported the entire movie, which is 100+ clips, I want to simply create a dvd of the game. I know I have to share it, but do you have a better suggestion as to how I should handle this?
    In the past, all I did was import the mini dv movie into imovie HD, share into idvd, and then that was it, dvd made. This process had become so time consuming.
    Please help!

    Yes, I recognized there would be a slight pause between clips - but after all - you paused the camera at those points.
    Putting them all in sequence in iMovie and then encoding in iDVD will take a lot of time.
    An old favorite saying of mine is "not every job worth doing, is worth doing well'. The meaning being sometimes 95% is good enough so you can go on to the next job.
    How much work do you want to put into each DVD? Can you live with the slight pauses?
    would you suggest using a memory card?
    Yes, but 16GB cards aren't cheap (yet).

  • Please help with PLSQL loop programing to join 2 tables

    The following two tables are created in Oracle 10g. Oracle is forced to merge these
    two tables (over column A). Write a PL/SQL block of code that performs this task.
    A C ||||||||||||||| A D
    2 c1 ||||||||||||||| 2 d2
    8 c1 ||||||||||||||| 8 d3
    6 c2 ||||||||||||||| 6 d4
    10 c34 |||||||||||| 4 d6
    1 c4 ||||||||||||||| 2 d7
    7 c4
    4 c5
    5 c6
    2 c7
    Requires a nested loop join in PL/SQL.
    Message was edited by:
    user635545

    Is there actually a question here or do you just want someone to write it for you?

  • How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore. Please help with proper steps, if any.

    How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore.
    On the new computer, I am getting a message that my all purchases would be deleted if I sync it with new iTunes library.
    Please help with proper steps, if any.

    Also see... these 2 Links...
    Recovering your iTunes library from your iPod or iOS device
    https://discussions.apple.com/docs/DOC-3991
    Syncing to a New Computer...
    https://discussions.apple.com/docs/DOC-3141

  • Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
    Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
    Thanks,
    Hussein

  • My iPod used to be signed in with my moms apple ID but now I have my own. When I opened IMessage it wanted me to sign in, but on the last step it said, "your email can't be verified since its already in use" please help I want to use IMessage.

    My iPod used to be signed in with my moms apple ID but now I have my own. When I opened IMessage it wanted me to sign in, but on the last step it said, "your email can't be verified since its already in use" please help I want to use IMessage.

    Hi Kanemelinda8833,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Associating and verifying email addresses with your Apple ID
    http://support.apple.com/kb/HE68
    Also, make sure you have signed out of your Mom's Apple ID and are signed in with your own Apple ID on this device.
    Click on the link to see more details and screenshots. 
    iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    Sign out of your Apple ID on all iOS devices, in the following locations:
    Settings > Messages > Send & Receive. Tap your Apple ID, then tap Sign Out.
    Sign in to your Apple ID on your device.
    When activation is complete, your Apple ID and all verified email addresses should be visible in Settings > Messages > Receive At
    Cheers!
    Judy

  • Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hello Priyanks,
    I found an article with steps you can take to troubleshoot issues with an iPhone not connecting to your car stereo:
    iOS: Troubleshooting car stereo connections
    http://support.apple.com/kb/TS3581
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • HT5824 I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. Please help with turning my iMessage completely off..

    I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. I have no problem sending the text messages but I'm not receivng any from iPhones at all. It has been about a week now that I'm having this problem. I've already tried fixing it myself and I also went into the sprint store, they tried everything as well. My last option was to contact Apple directly. Please help with turning my iMessage completely off so that I can receive my texts.

    If you registered your iPhone with Apple using a support profile, try going to https://supportprofile.apple.com/MySupportProfile.do and unregistering it.  Also, try changing the password associated with the Apple ID that you were using for iMessage.

  • PLEASE help!! I use Outlook for my email and the Mail App Icon in my dock was also storing all my emails. So, I tried to delete ONLY the emails in the Mail App but somehow (under Preferences maybe?) I also deleted all my emails in my Outlook inbox.

    PLEASE help!! I use Outlook for my email and the Mail App Icon that is in my dock, that I know nothing about, was also storing all my emails. So, I tried to delete ONLY the emails in the Mail App but somehow (under Preferences maybe?) I also deleted ALL my OUTLOOK emails in my inbox.  Can someone please please tell me if there is a way to get my Outlook inbox emails back OR EVEN the emails that were in my Mail app - because even tho I never use the Mail app, at least the emails would be there.
    When I was trying to delete the emails in my inbox for the Mail app - I followed THESE directions.  It did in fact clear my inbox for the Mail app.  But then I went to log on to my Outlook account and EVERY SINGLE EMAIL was gone.  And not in the Deleted box.  Just gone.  Here are the directions I followed that screwed everything up.  Please help.
    Top menu bar, Mail > Preferences > Accounts > Mailbox Behaviors.
    Uncheck "Store deleted messages on the server".
    At the drop list for "Permanently erase deleted messages when", choose "Quitting Mail".
    Next...
    Top menu bar, Mail > Preferences > General.
    At "When searching all mailboxes, include results from", uncheck "Trash".
    Select All = command A

    i found out my prob!
    here is what you do.
    go to the "system preferences" on your dock.
    click "software updates".
    click "installed software"
    if it shows something about a recent update about "EFI UPDATE, FIRMWARE, THUNDERBOLT" or anything like that, exit out of it.
    go to mail.
    click "mail" at the top.
    click "preferences...".
    find the account you are having trouble with, once you do, make sure its highlighted, then click the "-" at the bottom of the window (this will only effect that mail account, it will not effect your ical weather or not its synced thought that email account)
    hit the "+" (right next to the "-") and add your accout back!
    its something with that update that effected mail, i hope this works out for you, if not reply back

  • My youtube does not work on safari only when i try to play a video it says "This video is not available on mobile add to playlist" But i am using a mac air 11 inch it is not a mobile. Please Help. i have to use the youtube on firefox or chrome

    my youtube does not work on safari only when i try to play a video it says "This video is not available on mobile add to playlist" But i am using a mac air 11 inch it is not a mobile. Please Help. i have to use the youtube on firefox or chrome. At times it also say QuickTime Player can't open "video.3gp". and
    The file may be damaged or may not be a movie file that is compatible with QuickTime Player. when i try to open a video on youtube on safari

    I too am having the same issue as the OP.
    Your USER AGENT information is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/8.0.3 Safari/600.3.18
    Every webserver that receives a request from your browser is able to determine the HTTP USER AGENT information unless it has been removed by some software (e.g. firewall) before the request was trasmitted.

  • Please help with "You can't open the application NovamediaDiskSupressor because PowerPC applications are no longer supported." I have seen other responses on this but am not a techie and would not know how to start with that solution.

    Please help with the message I am receving on startup ""You can't open the application NovamediaDiskSupressor because PowerPC applications are no longer supported."
    I have read some of the replies in the Apple Support Communities, but as I am no techie, I would have no idea how I would implement that solution.
    Please help with what I need to type, how, where, etc.
    Many thanks
    AppleSueIn HunterCreek

    I am afraid there is no solution.
    PowerPC refers to the processing chip used by Apple before they transferred to Intel chips. They are very different, and applications written only for PPC Macs cannot work on a Mac running Lion.
    You could contact the developers to see if they have an updated version in the pipeline.

  • I have downloaded mozilla firefox a number of times. Over a few days it tells me that the firefox is no longer on my computer. I never delete it. Please help. I do use CCLEANER.

    I have downloaded mozilla firefox a number of times. Over a few days it tells me that the firefox is no longer on my computer. I never delete it. Please help. I do use CCLEANER. edit

    You are unfortunately out of luck with an Intel Mac and OS X 10.4.11<br />
    Best would be to update to OS X 10.5 or later if you want to use Firefox 4 and later versions (current is 8.0).<br />
    There is a Firefox 8 compatible third-party version TenFourFox from www.floodgap.com for a PowerPC Mac, but no alternative for an Intel Mac with Mac OS X 10.4.
    Firefox 4 and later require at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/8.0/system-requirements/
    Firefox 3.6.x (Mac OS X 10.4 and later) can be found here:
    * http://www.mozilla.com/en-US/firefox/all-older.html

  • [ETL]Could you please help with a problem accessing UML stereotype attributes ?

    Hi all,
    Could you please help with a problem accessing UML stereotype attributes and their values ?
    Here is the description :
    -I created a UML model with Papyrus tool and I applied MARTE profile to this UML model.
    -Then, I applied <<PaStep>> stereotype to an AcceptEventAction ( which is one of the element that I created in this model ), and set the extOpDemand property of the stereotype to 2.7 with Papyrus.
    -Now In the ETL file, I can find the stereotype property of extOpDemand as follows :
    s.attribute.selectOne(a|a.name="extOpDemand") , where s is a variable of type Stereotype.
    -However I can't access the value 2.7 of the extOpDemand attribute of the <<PaStep>> Stereotype. How do I do that ?
    Please help
    Thank you

    Hi Dimitris,
    Thank you , a minimal example is provided now.
    Version of the Epsilon that I am using is : ( Epsilon Core 1.2.0.201408251031 org.eclipse.epsilon.core.feature.feature.group Eclipse.org)
    Instructions for reproducing the problem :
    1-Run the uml2etl.etl transformation with the supplied launch configuration.
    2-Open lqn.model.
    There are two folders inside MinimalExample folder, the one which is called MinimalExample has 4 files, model.uml , lqn.model, uml2lqn.etl and MinimalExampleTransformation.launch.
    The other folder which is LQN has four files. (.project),LQN.emf,LQN.ecore and untitled.model which is an example model conforming to the LQN metamodel to see how the model looks like.
    Thank you
    Mana

  • Help with do loop

    do{     
    if((orderType != 'g') || (orderType != 'w')){     
    System.out.println("Please enter g or w only.");
    }while((orderType == 'g') || (orderType == 'w'));
    I need help with this loop... I have to make sure it will be able to pop the input back after the invalid input... i tried to fix it...wont stop and stay in same loop till it gets the valid before go to other loop... how? am i missing something?

    I know you've already been answered, but just a bit more...
    if((orderType != 'g') || (orderType != 'w'))That would always be true. All characters are either not equal to 'g' or not equal to 'w'.
    'x' : neither 'g' nor 'w'. Evaluates to true.
    'g' : not 'w', still evaluates to true.
    'w': not 'g', still evaluates to true.

  • Please help with slideshow problems!

    Am using Photoshop Elements 8 and trying to make a slideshow. Have tried 4 times now and keep ending up with same problem, cannot reopen project to continue edititing.  Won't show up in orginizer and when I find on harddrive and try to open get message " wmv file cannot be opened".  How can I save a
    slideshow inprogress and be able to reopen and continue to edit and make slideshow?  I want to thank anyone who can help me with this in advance as I
    have gotten so frustrated that I want to just scream.
    Thanks

    Thanks for the help, thought I had done so but maybe not.  Anyway will have another go at it, now may I ask another
    question?  I am trying to add audio to slideshow.  I have some music I purchased thru amazon as mp3 files but I get
    message no codec and when I try to add wmv I get same message.  What type of file do I need and how can I add
    multiple songs to one slideshow.   I have one little wmv file that will go in, but it just replicates itself multiple times until
    it fills slide show. 
    Thanks again, sorry to be a bother, but this thing is driving this old man crazy.
    Date: Sun, 26 Dec 2010 20:34:32 -0700
    From: [email protected]
    To: [email protected]
    Subject: Please help with slideshow problems!
    You need to save the slideshow project in order to be able to go back later and make changes or additions to an existing slideshow . The wmv file is a final output format.
    Now you are most probably using only the Output command: that is what makes the wmv file.
    You should also do the Save Project command. (and I make it a practice to do the Save Project command before I do the Output command).
    If you look at the Elements Organizer 8 Help, there is a topic on "Create a slide show".
    -- Very close to the beginning of that topic is a screen shot of the Sldie Show Editor screen,
    -- The bar below the usual menu bar is labeled with a "B" and called the Shortcuts bar.
    -- The 1st entry on that Shortcuts bar is "Save Project"
    It is the Save Project command that saves the information about which photos, audio, etc you placed in that specific slide show so that you can come back again to do subsequent editing.  Save each Project with a unique name.
    After completing the Save Project command, you shoud see an "icon" in the Organizer for that slide show.
    Note:  you must also keep the photo files and audio files which you have used in this slide show: you can't delete them because the project file does NOT contain a copy of the photos, it only has the identification and folder location of the photo and audio files.
    >

Maybe you are looking for

  • Quicktime Logo Display Whilst Loading Video Content

    We are currently building a HTML5 platform using VIDEOJS and have come up against an issue when using it on an ipad. We have several videos loading in a sequence which can be played when an icon is selected. The platform works perfectly on a desktop

  • My Ipod Classic keeps shutting down, even when fully charged

    I have upgraded my Ipod classic operating system and all was well. Suddenly, it has started shutting down after 5 minutes of use, even when the battery is fully charged.

  • Maintain standby database with DG

    Good day, I have primary and ph.standby databases. I'd like to maintain standby database with DG(Data Guard), but DB_UNIQUE_NAME and SERVICE_NAME are the same for primary and ph.standby. Is it possible to adjust DG broker?

  • What is "na" means in "stack" column for Precise CPU Usage?

    I'm trying to analyze CPU usage of third party process. I zoomed in on 3 sec of process eating 25% of CPU and it's a single thread 4184 doing it. When I add "stack" column after Thread Column, it shows that processing split is between [Root] and n/a

  • Inserting Tabs with multiple graphic on same

    Hi experts I have follow DHTML function for each Tab in Tab-Header for SAP BW 3.5: <a href="http://help.sap.com/saphelp_nw04/helpdata/en/65/c54a7e1a1b584589d238ba188df053/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/65/c54a7e1a1b584589d2