I have a infinitive loop program enters the loop when a button clicked
Then you code is executing on the Event Dispatch Thread and you a preventing the GUI from responding to events or repainting itself until the code is finished executing.
You need to create a separate Thread to execute the code in this loop. The easiest way to do this is to use a SwingWorker
then you can publish
intermediate results to display on your label. Read the section from the Swing tutorial on Concurrency for more information and examples.