My question is probably dumb, but are you running that loop from a different thread than the one the paint() method is running from? I experienced a problem like what you described when I was running a loop to translate an object from inside paint(). My problem was that the FrameBuffer needs to be updated for translations to take effect. The solution was to run the translation loop in a different thread than the paint() method (i.e. the main "game loop").
Another way (easier, but uglier) would be to structure your paint() method something like this (untested):
@Override
public void paint( Graphics g )
{
if(selected.getTransformedCenter().y <= -50){
System.out.println("x : "+x);
x=Math.sqrt(x);
selected.translate(new SimpleVector(0,-x,0));
try {
Thread.sleep(500); // (paint() is a bad place for this to be)
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("selected y : "+selected.getTransformedCenter().y);
x++;
repaint(); // doesn't actually call paint(), but lets program know it should
}
buffer.clear(); // erase the previous frame
// render the world onto the buffer:
world.renderScene( buffer );
world.draw( buffer );
buffer.update();
buffer.display( g, 0, 0); // Paint this frame (software mode)
}
In summary, the important point here is: the FrameBuffer must be updated for translations take effect. That is probably not what your problem is, but I thought I would bring it up just in case. Sorry if this doesn't help you out much.