Vector format help!

in an array i could do this:
public class items
  String label;
  int qty;
  double price;
public static void main(String[]args)
items[] i = new items[1];
items[0] = new items();
items[0].label = watta;
items[0].qty = 1;
items[0].price = 4.5;
}but how about on vectors? how can i format a vector slot to contain the class items at the same time?

Your main method is wrong. It's better to create an object, set it's properties, then add it to a collection. Also, you're referencing the class name, not the array variable.
public static void main(String[]args) {
    items anItem = new items();
    anItem.label = watta;
    anItem.qty = 1;
    anItem.price = 4.5;
    items[] itemsArray = new items[1];
    itemsArray[1] = anItem;
}Use ArrayList instead of Vector. Read the Collections tutorial: http://java.sun.com/docs/books/tutorial/collections/interfaces/list.html

Similar Messages

  • Need to convert to vector format.

    I have a document with pictures.  I need to convert it to vector format before sending to printer.  Not sure how to do it.  Using CS5.  Is converting to outlines the same? 

    It must be difficult to convert from illustrator into a vector format since no one has a specific answer.
    Soshagayle7,
    There is no automagic "conversion" from a raster image to a vector graphic. The artwork represented by a raster image can be redrawn as vector artwork.
    You can re-draw the artwork using the vector drawing tools in Illustrator or any similar program. You can even import the raster image and use it as a guide while "tracing" it with vector paths.
    Or (and this is where the all-too-common misconception about "conversion" comes in)...
    You can use the autotrace feature which exists in Illustrator or any similar program to try to automate the process of "tracing" the raster image with vector paths.
    Either way, you end up with what would more accurately be called a "reinterpretation" of the subject, not a "conversion" of the raster image in the sense of "converting" one file format to another.
    And that's the key. All that most current autotrace features (including the one in Illustrator) do is detect color differences between pixels of a raster image based upon a user-specified sensitivity setting, and then try to draw vector paths which follow along those detected differences. It's very much a garbage-in-garbage-out process.
    And even when the "in" is not garbage, there is no real intelligence involved. The kind of autotrace algorithms in Illustrator and programs like it have no shape-recognition intelligence. For example, in the case of a human face, the autotrace feature doesn't know that the eyes' pupils are round; it just detects a region of similarly-colored pixels and tries to draw a path around them. Similarly, in the case of a geometric logo that obvously (to a human) is supposed to contain a perfect circle, the autotrace feature doesn't "see a circle"; it doesn't go and get the Ellipse tool and draw a circle that fits, as any human would do. Again, it just tries to follow around the regions of similarly-colored pixels.
    But that sounds okay, right? Well think about it. Imagine turning the sensitivity of such an algorithm way up to the max. What's going to be the most accurate autotracing of a raster image? The mathematically "most accurate" result would be a perfect vector square for each and every pixel in the image. And the "vector advantage" of that would be absolutely nill. The resolution-independence reason for preferring vector paths would be rendered moot. Such a graphic would be entirely vector, but to absolutely no advantage regarding scaleability. (Thus my comment about the line drawn with a 1-pixel raster image.)
    So the reason you haven't received an answer to the "how do I convert" question is because the same thing has been explained in this forum countless times, and to answer it correctly really requires a lengthy explanation (like this one) that tries to clear up the too-common misconception that autotracing is some kind of magic bullet for "converting" a raster image into a vector graphic in some kind of mathematically accurate way that then yields all the advantages of properly drawn vector graphics.
    Autotracing is useful to those who understand when it's appropriate and why. But without seeing or at least knowing more about the actual raster image you are dealing with, advising whether it's appropriate in your case is nothing but a guess. Generally speaking, if the image in question is not already of high enough resolution at the size at which it will be printed, then it's probably also not of high enough resolution for good auto-tracing results. And if it is of sufficient resolution for the size at which it will be printed, then there's probably no reason it needs to be vector.
    Bottom line: There's a good reason why vector graphics are preferred. But that means properly-drawn vector graphics. The best way to "convert" your raster image to a vector graphic is to re-draw it using the vector tools. The sometimes-acceptable but often sub-standard "cheat" for doing it is to import the graphic and apply the autotrace feature (called LiveTrace in Illustrator). It's use is explained in the online help.
    Autotracing--the "conversoin" that such questions are almost always talking about--is not a lossless translation, like converting quarts to gallons or binary to hexidecimal. Entropy always rules. Anytime something is automatically "reprocessed" something is lost, not gained. You see that in everything from repainting a room over and over without removing the old paint, to taking photographs of photographs of photographs. Degradation occurs. You swap one kind of ugliness for another. That's autotracing when used inappropriately.
    The drawing tools exist for a reason. If you really need vector paths, you should probably draw them.
    JET

  • Can I export solid objects into Illustrator / InDesign CS2 and maintain vector format

    Can Adobe 3D export solid objects in vector format into Illustrator or InDesign CS2 suite?
    I'm interested in taking solid 3D objects developed in Pro/E 2.0 and import from Adobe 3D into Adobe Illustrator & InDesign in vector format for page layout. I want to import solid objects in vector format and maintain color scheme and surface textures.
    I'm running 3D trial version and can successfully import 3D objects (asm & prt files) solid views from Pro/E but can only export wireframe views from Adobe 3D Toolkit into Illustrator or InDesign (CS2). Solid objects first have to get rendered in a raster format before importing into Illustrator.
    If this function is not supported does anyone have experience doing this using Quadraspace or Right Hemisphere 3D software?

    Any help???? After 2 weeks I still can't learn from Adobe or Right Hemisphere people how to import solid objects in vector format into Illustrator with color and surface textures in place. All imported objects in vector format are converted to a wireframe or line format unless they are first rasterized.

  • CS5 issue - Text not keeping Vector format when saving as PDF

    Hi everybody,
    I am very frustrated right now. I am working in PS CS5 in Windows, and I cannot get the text to keep the raster format where it's cleaner / clearer, and can be highlighted, searched for, etc.
    What's really puzzling is that it will work sometimes, but other times it will not, and I'm not doing anything different. Some text layers keep the vector format, and some do not. I've searched, and the only solution I see is for older versions of PS where it just says to select the "keep vector format" checkbox, which is not in the save options in CS5.
    Can anyone help me out with this? Any assistance would be much appreciated!!
    Trevor

    Hello!
    Yes, faux bold is an effect on the text that can't be vectorized.
    You'll need to change your font to another one that has a "real" bold option.

  • Illustrator CS5 Not the Default for EPS and other Vector Formats

    Hey everyone, the issue I'm haveing is not just with Illustrator, but sense I couldnt find a general CS5 forum, and Illustrator was the last CS5 application i noticed this for I'm hoping to find some answers here.
    So on to the issue....
    I have noticed that on other computers (Macs for sure) that Illustrator, Photoshop, Dreamweaver etc... are set as the default handlers of certain file types that are associated with each application, and as such, give each filetype there own little icons reflecting such.
    However on my system (Windows 7 Ultimate x64) this does not seem to be the case. I can go in and set them as default manually, which I have done for the filetypes I use most frequently, but I do not get to enjoy the nice icons that made for each filetype, i just get a bland, default icon that is the same for every filetype.
    Is there a way to fix this issue?
    Thanks for you help.

    Yes, I think i mentioned it before that I knew I could set the default app through Explorer (right clicking, going to "open with" etc..) but this doesn't let you use any of the custom icons that come with the adobe applications, it sets it as the default icon associated witht he particular application. I'll take a look in the properties when I get home but, but I think you may be referring to the "open with" dialogue.
    Most applications like Firefox, iTunes etc.. have a button in there preferences menu to "set as default" for all file types they can open, however I don't see such an option in any Adobe applications except for bridge, and that doesn't seem to do anything.
    Date: Thu, 8 Jul 2010 00:09:53 -0600
    From: [email protected]
    To: [email protected]
    Subject: Illustrator CS5 Not the Default for EPS and other Vector Formats
    I believe in the properties pane for one of those files it will display the default app for opening such files and you can  change it there as well and make it apply to all similar files.
    >

  • After upgrading to Yosemite I cannot share my pages document by mail as a word format - HELP please!!!

    After upgrading to Yosemite I cannot share my pages document by mail as a word format - HELP please!!!

    You don't need to go to the App Store to for support for Steam and Minecraft. You need to go to their website(s).
    You're welcome 

  • Is it possible to export of the stage of a Flex application in vector format?

    Is it possible to export of the stage of a Flex application in vector format?
    Right now our only option is to render our graphs to a (large, off-screen) bitmap and export that bitmap, which is a real shame because every
    component in Wondergraphs is 100% vector based.  Anyone at Adobe know more about this?

    Hi.
    Try start->search for pen and touch--> then uncheck "Use your finger as an input device" in the Touch tab.

  • How do I save a jpg that I have in photoshop elements as a high-res or vector format.

    how do I save a jpg that I have in photoshop elements as a high-res or vector format.
    thanks

    Welcome to the forum.
    I wonder, however, if you meant to post to the Photoshop Elements Forum, and not to the Premiere Elements (Video editing program) Forum?
    If you want PSE, then see the above link.
    To Save_As uncompressed, you might want to look at PNG for the format.
    Good luck,
    Hunt

  • Export vector format

    Hi,
    in my Flex Project i need to save a pdf or  another vector format from my group that contains vector graphics.
    I was trying AlivePDF, but seems not be able to export in vector format.
    Any Ideas?
    Thanks a lot

    You could do it with layers - but it's rather complex way to work and to ensure you have the correct layers turned on.
    Plus somtimes you want background images, and foreground images and images inbteween background and foreground.
    At the moment - InDesign will export to PDF and use the linked files as the source of what is inserted into the PDF.
    Think of PDF as a wrapper for all your content.
    If it's an EPS in your layout - it's a vector in the PDF.
    I don't know of a way to do what you want - except manually doing it.

  • Turing an illustrator design into vector format

    Hello,
      I recently finished an illustration using both the drawing and pen tool in Illustrator. I have exported the file as a png and have been asked to convert it into a vector format.
    How is this done?
    Thank you for your time.
    J

    Ok... so I've saved my images as PDFs... on my website I have dynamically created a list... on the right side of the list are 2 buttons.  Once I got over about 7 items in my list occasionally one of the sets of buttons gets all messed up as seen in the attached pic.... any ideas of what is going on and how to fix it?  Ohhh... and this is only a problem on the IPad-Safari browser.  Iphone it looks fine.... other browsers are mostly NA since I can't get PDFs to display in a lot of the other browsers, so I have a .PNG version for those....   If there is a solution to get the PDF versions working for other browsers that would be great too

  • How to download movies? I download as well as music, and writes that can't format. help please

    how to download movies? I download as well as music, and writes that can't format. help please

    Check the iTMS, if the movie isn't listed there, it's not for sale.

  • How do I  print out the attributes of objects from a  Vector?  Help !

    Dear Java People,
    I have created a video store with a video class.I created a vector to hold the videos and put 3 objects in the vector.
    How do I print out the attributes of each object in the vector ?
    Below is the driver and Video class
    Thank you in advance
    Norman
    import java.util.*;
    public class TryVideo
    public static void main(String[] args)
    Vector videoVector = new Vector();
    Video storeVideo1 = new Video(1,"Soap Opera", 20);
    Video storeVideo2 = new Video(2,"Action Packed Movie",25);
    Video storeVideo3 = new Video(3,"Good Drama", 10);
    videoVector.add(storeVideo1);
    videoVector.add(storeVideo2);
    videoVector.add(storeVideo3);
    Iterator i = videoVector.interator();
    while(i.hasNext())
    System.out.println(getVideoName() + getVideoID() + getVideoQuantity());
    import java.util.*;
    public class Video
    public final static int RENT_PRICE = 3;
    public final static int PURCHASE_PRICE = 20;
    private int videoID;
    private String videoName;
    private int videoQuantity;
    public Video(int videoID, String videoName, int videoQuantity)
    this.videoID = videoID;
    this.videoName = videoName;
    this.videoQuantity = videoQuantity;
    public int getVideoID()
    return videoID;
    public String getVideoName()
    return videoName;
    public int getVideoQuantity()
    return videoQuantity;
    }

    Dear Bri81,
    Thank you for your reply.
    I tried the coding as you suggested
    while(i.hasNext())
    System.out.println( i.next() );
    but the error message reads:
    "CD.java": Error #: 354 : incompatible types; found: void, required: java.lang.String at line 35
    Your help is appreciated
    Norman
    import java.util.*;
    public class TryCD
       public static void main(String[] args)
         Vector cdVector = new Vector();
         CD cd_1 = new CD("Heavy Rapper", "Joe", true);
         CD cd_2 = new CD("Country Music", "Sam", true);
         CD cd_3 = new CD("Punk Music", "Mary", true);
         cdVector.add(cd_1);
         cdVector.add(cd_2);
         cdVector.add(cd_3);
         Iterator i = cdVector.iterator();
         while(i.hasNext())
           System.out.println( i.next() );
    public class CD
       private String item;
       private boolean borrowed = false;
       private String borrower = "";
       private int totalNumberOfItems;
       private int totalNumberOfItemsBorrowed;
       public CD(String item,String borrower, boolean borrowed)
         this.item = item;
         this.borrower = borrower;
         this.borrowed = borrowed;
       public String getItem()
         return item;
       public String getBorrower()
         return borrower;
       public boolean getBorrowed()
         return borrowed;
       public String toString()
          return System.out.println( getItem() + getBorrower());

  • Ipad locked, PC formatted, help on saving data from ipad...

    I need help....i typed my passcode wrongly 4-5 times and my ipad got locked, my pc crashed so had to format hard disk. Now i dont have itunes back up and fear of loosing all my data and purchased music...please help

    You can reload your purchased music/apps/video from the cloud. However, you will need to restore your iPad and since you don't have a backup all data and unpurchased content will be lost.

  • Date Format Help: DD-MON-YY

    Hello everyone.
    Good Day.
    I would like to seek your help regarding my inquiry on the PL/SQL script output that I am trying to create.
    Please see below output of my script:
    L7,CU4450278,70X1W01AGA-ASY,11813,20-6æ -13,0
    L7,CU4464442,747X32VH9015-ASY,3394,20-6æ -13,0
    L7,CU4464766,747X22VH9015-ASY,3383,21-6æ -13,0
    As you can see in the CSV output, the date has some invalid value, the "6æ " should have been Jun (i.e. Short Month format of June).
    My script has this code for date dbms_output to_char(startplan_rec.str_startdate,'DD-MON-YY')
    The startplan_rec.str_startdate data type is date.
    I have tried querying the same table in the oracle sql developer, but i am getting the correct output (e.g. 20-Jun-13).
    Please help me on having my desired date format output on my pl/sql. Why is my date output on my script incorrect?
    Thanks in advance.
    Regards,
    Jeff.

    JEFTPHPH wrote:
    Hi Hoek:
    I am using sql plus for the project.
    I was just following a certain format from a requirements that is why I am still using the YY thing.
    BTW, I've heard about the Y2K thing when i was on college.
    THanks,
    Jeff.
    Boy does that make me feel old.  A few years ago I was at a workshop when a young developer expressed to me his opinion that Y2K was a hoax.  His "proof" was the fact that "nothing happened after all."  I had to explain to him that reason it seemed "nothing happened" is because armies of guys like me had spent two years busting our butts fixing the problem before the excrement collided with the ventilation system.
    But I have code that is older than his birth certificate.

  • Colour Format Help

    I am a designer and not a Java programmer - don't hate me - and i am using a small calendar applet on a web page. This has color configured from javascript parameters as follows:
    <param name=bgcolor      value=13684944>
    <param name=bgcolor2      value=14737663>
    <param name=bgcolor3      value=400>
    <param name=t_col1      value=400>
    <param name=t_col2      value=8421520>
    <param name=t_col3      value=14737663>
    Can anyone tell me how these numbers relate to either HEX or RGB. I have tried simply placing RGB figures in there but they do not bear ant relationship to the standard color tables....HELP????!!!!

    Yes, thats true,
    It must be using format like:
    int r = (0x00ff0000)>>16;
    int g = (0x0000ff00)>>8;
    int b = 0x000000ff;
    where r=255, g=255, b=255 this case, but if
    long r = 0x00ff0000;
    long g = 0x0000ff00;
    long b = 0x000000ff;
    which give you r=16711680, g=65280, b=255....make sense?

Maybe you are looking for

  • Problem with starting IWS6.0 after installing PHP

    I recently installed php40 with IWS60 running on sparc sol8. When starting webserver from either command lines or admin panel, the server failed to start with the following errors: start failed. (2: unknown early startup error) iPlanet-WebServer-Ente

  • Bridge "The operation could not be completed" Windows 7

    I've seen this issue discussed with bridge not starting up on macs. I'm having this issue running windows 7 professional 32 gigs of ram intel xeon x64 Bridge worked fine for a while and now wouldn't start.

  • Is there a trial version of Captivate 6.1 update?

    Hi there, We'd really like to be able to use the drag and drop functionality of the new update but we only have the licenced version. We would like to be able to test the drag and drop function to see if its worth us paying for a subscription to be a

  • Proposed changes to Business Model and effects on BW Reporting

    Dear All The Business is giving consideration to reducing (consolidating) its current number of Business Areas in use. They are stating they are not sure whether it will just rename some of the current Business Areas or create completely new ones. We

  • Windows to Linux

    Bought this netbook (S10e), but it has XP on it which I don't like (Don't use any Windows OS on my Laptop or Desktop.   I wish to convert to any form of Linux (PCLoS preferably), but I do wish to keep the quick launch facility.   3 Questions... 1.