Timer and timerTask small issue
<p>i am a noob at java. This is my first time use timer and timerTask class in java. </p>

<p>Purpose of my app: </p>

<p>It is multi client app that implemented with MySQL. My app is to read my database data repeatly. If database updated, then i want every client's panel updated as well. so I assume i need a timer class that can automatically perform repeating query that read my database and then make some change on the component of the client side.  </p>

<p>Problem:</p>

<p>I look thought some tutorial and i found this way to do it. Since this.updateTableStatus() method is in my Table class, how can i use that method in my MyTimer(timerTask) class.</p>

<pre><code>public class Table extends javax.swing.JFrame {

    public Table() {
        initComponents();
        MyTimer myTime = new MyTimer();

    }
    public void updateTableStatus(){
        // this is where I refresh my table status which is reading database data and make some change.
    }

    class MyTimer extends TimerTask{
        public MyTimer() {
            Timer timer = new Timer();
            timer.scheduleAtFixedRate(this, new java.util.Date(), 1000);
        }
        public void run(){

            this.updateTableStatus();   // this is not working!!!, because they r not in the same class.  I need help to solve this problem.
        }
    }
}
</code></pre>

<p>Help me out guys. thank you so much.</p>
