Home  >  Q&A  >  body text

java repaint()无效

黄舟黄舟2716 days ago242

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:13:20

    1. Before each rendering, the previous canvas must be cleared, otherwise it will be superimposed

    2. If you want to display animation, you need to set a sleep time, otherwise you will not be able to see the intermediate process

    reply
    0
  • 阿神

    阿神2017-04-18 10:13:20

    It’s probably because you are not here x=2, y=2 时清除之前 x=1, y=1 时写的 "hello", so they all overlap and form a thick blue line : )

    reply
    0
  • Cancelreply