Moving objects on the Z axis


There is the methods bringObjectToFront(JGoObject obj) and sendObjectToBack(JGoObject obj) to move an object in front or in back of all other objects.
I also want to move an object in front of the next object or behind the previous object. I tried to use the insertObjectBefore and insertObjectAfter methods but I don’t success to use them. It doesn’t move anything and can give me StackOverflow errors.
Is it possible to do?

Did you do something like: JGoLayer layer = obj.getLayer(); JGoListPosition p = layer.findObject(obj); layer.insertObjectAfter(layer.getNextObjectPosAtTop(p), obj); This code works for me.


Thanks, it works for me too