access array list item from draw
Hey, iv been struggling trying to access data in an array list object, the array list contains an integer value id like to use to draw on screen so if anyone can tell me how to access it id be very grateful :
Code:
ArrayList<Object> imageposx=new ArrayList<Object>();
//instance of the arraylist im using
Integer xpositionlist=new Integer(last_X);
imageposx.add(xpositionlist);
// add last place clicked to the array list
//how i am trying to use it
g.drawImage(imagefile,imageposx.get(0), 0, null);
The problem is the draw function wont accept imageposx.get() as it is an object type as opposed to a integer, so is there a way to access it or convert it to an integer type to use in the drawimage function?