Can someone give a simple example of updating a textfield every second or so?
I want to make a flying ball and need to calculate/update the ball coordinates every se
This is some simple code for a timer:
Timer timer = new Timer(); TimerTask t = new TimerTask() { @Override public void run() { System.out.println("1"); } }; timer.scheduleAtFixedRate(t,1000,1000);