I need to manage dynamic arrays so I use an arraylist, considering that there is no int type arraylist use an integer type, but in the function I need to use the values of the arraylist, it only accepts INT type, so I need to copy them to a INT type array, I'm currently trying to do it like this:
ArrayList<Integer> NewptsX = new ArrayList<Integer>();
ArrayList<Integer> NewptsY = new ArrayList<Integer>();
int[] ptsX = NewptsX.toArray();
int[] ptsY = NewptsY.toArray();
Function that requires INT values:
h.drawPolygon(ptsX, ptsY, NLados);
h.fillPolygon(ptsX, ptsY, NLados);