long waitTime,long nowTime;float frameTime;
waitTime=System.currentTimeMillis();
while (true){
  nowTime = System.currentTimeMillis();
  frameTime = (nowTime-waitTime ) /1000.0f;
  waitTime = nowTime;
  chara.move(DOWN,frameTime);
  repaint();
  try {
    Thread.sleep(10);
  }catch(InterruptedException e){
    e.printStackTrace();
  }
}
public void paintComponent(Graphics g){
  super.paintComponent(g);

  g.drawString("一回表示するのにかかる秒数:" +Float.toString(frameTime),5,15);
}
-Chara
int speed = 100;//キャラの速度。1秒で100ドット。
public void move(int dir,float frameTIme{
  moveQuantity = (int)(speed * frameTime);
  switch(dir){
  case DOWN:
    buff.translate(0,moveQuantity);
    break;
  }
}
jdkのjavaで実行した場合とjreのそれとでは前者は安定していて後者は
不安定(時々カクカクする)ですが前者の3倍ほど処理速度が速いです。
仕様ですか?私のパソコンがへんですか?どっちも5update4です。