how to make JDialog show progress?
First of all, yes, I used the search function and I know this problem is all over the board, but as so often, the topics I found don't answer my question.
The Mission: So I want to show my program's user the progress of a function with a progress bar displayed in a custom JDialog along with some other information.
The Solution?: After hours of searching and trying, I stumpled upon http://www.javareference.com/jrexamples/viewexample.jsp?id=77 , which actually works. Problem is, when I try to build it into my app, it doesn't work anymore.
The Problem: So what did I do? First, I put the create dialog and perform computation stuff from the example into a function "progressFunction" instead of doing it right away in the main function. Then I wrote a JFrame that has a button. JFrame knows the programs core class with the main function and progressFunction. Clicking on the button calls the progressFunction from the core class. Function gets executed, JDialog shows, but without its contents, namely a progress bar to show the progress of the function.
The plea for help: As far as I understand, this problem should be solved by putting the execution of the JDialog into a seperate thread, as it is done in the example.
So, does anyone have a clue why this works directly from the programs main function, but not if I take an indirect approach over user interaction with the gui that calls the function?

