I assume you need help in getting those coordinates???
If so, then it should be fairly simple. If the object is moving across the screen, then obviously you are doing something to change it's coordinates. Just get the values that are changing. If you provide more information I can help you more.
Thanks for the reply.
Capturiing the coordinates was not the problem. My program captures them and immediately prints them to the screen without putting them in an array or anything. I have no idea how many coordinates there will be and cannot size an array. Therefore, what I am looking to do is write them to an outfile instead of to the screen.
(in a Constructor)
// FileWriter outfile = new FileWriter ("antlog1.txt"); // Creats a new
// file to track
// the ants locations
(in a Method)
if (isAlive())
{
cycle = cycle + 1;
Footprint fp = getBounds();
xCoord = (float)fp.getXOrigin();
yCoord = (float)fp.getYOrigin();
// Prints the current location of the ant to the screen.
System.out.println("Ant Location is : Cycle " + cycle + " , " + xCoord + ", " + yCoord);
// Writes the current location of the ant to the the log file.
out.write("Ant Location is : Cycle " + cycle + " , " + xCoord + ", " + yCoord);
(I want to take the coord file and input it to ArcGIS, a Geographic Information System software to do further analysis.)
I am a beginner to java and don't understand how to write output to a file. What I have read about java.io has left me confused. FileWriter, BufferWriter, nio and channels ???!!!.
Any help or just a point to a straightforword simple source/website will be appreciated. I think I am just chasing my tail now and need to break out of the loop.