All these days I've been trying to access a Swing component (e.g.: JLabel) from a separate thread. I tried using "Thread", "Timer", "SwingWorker" but I couldn't find the solution.
- Using a thread results in stack overflow.
- Using a timer doesn't access the Swing component (e.g.: change the text property of a JLabel)
- Using a SwingWorker I could not do an infinite loop cause it seems to me that it's method must return a value so it cannot work infinite (cannot be "void").
Important note: the thread must not "freeze" the visual interface while looping.
Hope I was clear enough so that someone can help :).