A daft question, but I really cannot get this to work: I have some long-running process in a Swing application which may take several minutes. I want to display a progress d
You must be doing something wrong. Try the tutorial on How to Use Progress Bars. If you can understand how that code works, it should give you the direction for achieving the required feature.
Note that progress bars are usually modal.
You should be using the GlassPane from preventing the user from interacting. The good thing is this is modal for the user and not your program so your thread won't get blocked.
The great news is that you can also use it for cool GUI effects like shading the GUI portion busy and the user can't interact with. You can also display a busy gif image in the GlassPane.
Links:-