Error with timer and JFrame

后端 未结 3 1691
夕颜
夕颜 2021-01-29 13:36

I\'m making a game with a timer and a JFrame (and many other things but only these 2 are causing problems), and after running the segments below, I got a weird error. At least f

3条回答
  •  清酒与你
    2021-01-29 14:32

    The method to override is paintComponent() not "paintComponents" (with an s).

    You should never invoke the paintComponent() method directly. Instead you invoke the repaint() method on the component.

提交回复
热议问题