I have a thread that I start when I press the start button. What I want to do is repaint the labels so they contain the information that my thread makes changes to. The only problem I am facing is that the jLabels repaint only after the thread is done running. Can someone give me any sugestions on how I can make it repaint while the thread is runnong? Thanks.

Here is a snippet of my code:

```
Store m = new Store(); //Store extends Thread
private void startActionPerformed(java.awt.event.ActionEvent evt) {    
    ....
    //I get the simulation time of the store from a textbox
    //the thread runs for this number of seconds
    //when it is done, the store is closed(the open variable is set to false)
    ....

    m.start();

    while (m.isOpen()) {
        queue0.setText(String.valueOf(m.clientiCasai(0)));
        //here I will have more queues
        ....
        noOfClients.repaint(); //this is the label that should show the number of clients in queue 0
    }
}  

```