Strange printing behaviour

Hello all.

I'm posting here since the behaviour I'm experiencing is with java.awt.print.

Ihn my code I have a vector of strings, which needs to be printed.

I have a class that implements the 'Printable' interface, and thus has the method 'print' defined.

In the method print, I simply take the elements from the vector and place them on the printable area :

g2d.drawString (myVector.remove(0), (int)dimX, (int)dimY);

However, not all the pages were printing.

After checking, I found that the 'print' method is called 3 times for every 1 (one) page printed.

This means that not all my data is printed.

The only real workaround is to instead use a variable 'PlaceInVector' and instead use :

g2d.drawString (myVector.get(PlaceInvector), (int)dimX, (int)dimY);

Is this behaviour normal ? Or is there another workaround that can be used ?

madant

[930 byte] By [MadAnta] at [2007-11-26 22:24:08]
# 1
Has anyone else been able to observe this behaviour ?Has anyone had problems that could be observed due to this behaviour ?
MadAnta at 2007-7-10 11:24:01 > top of Java-index,Desktop,Core GUI APIs...