how does a swing timer work?

后端 未结 3 1068
一生所求
一生所求 2021-01-17 06:34

hello i am having trouble trying to understand swing timers. to help me could someone show me a simple flickering animation? i have looked arround on the internet but still

3条回答
  •  独厮守ぢ
    2021-01-17 07:31

    I think a paint method would work.like this:

    public void paint(Graphics g){
    super.paint(g);
    
    g.setColor(Color.green);
    g.filloval(30,40,50,50);
     }
    

提交回复
热议问题