Openning JDialogs multiple times in an Application
posted 10 years ago
If a JDialog will be openned multiple times during the lifespan of an application, should it be created once and then shown each time it is needed, or is it ok to just create it new each time it is needed?
You probably could go either way. And you'll probably hear valid arguments for both. My preference is to just have the app create a new one each time. I have no specific reason for this though. Just seems easier for me. I'd imagine it could be less buggy as well since you don't have to worry about left over data existing in the original object.