Search:

Type: Posts; User: copeg

Search: Search took 0.09 seconds.

  1. Thread: Arraylist help

    by copeg
    Replies
    7
    Views
    4,298

    Re: Arraylist help

    ArrayList is generic, so if you do not define the objects put in, you must do so when you take them out. Solution 1 is to cast the object when you get it from the list

    ...
  2. Thread: Arraylist help

    by copeg
    Replies
    7
    Views
    4,298

    Re: Arraylist help

    Please post the code and errors you are receiving, both of which are a wealth of information to help solve your problem
  3. Thread: Arraylist help

    by copeg
    Replies
    7
    Views
    4,298

    Re: Arraylist help

    ArrayList colors = new ArrayList();
    //add all colors to the list
    for ( int i = 0; i < colors.size(); i++ ){
    myPen.setColor(colors.get(i));
    }
Results 1 to 3 of 3