Eric Clayberg Messages: 847 Registered: July 2009 Location: Boston, MA
Rayleigh Mising name wrote on Tue, 10 January 2012 05:38
Is it possible to get it working without touching the code? We've got a lot of legacy code that isn't even ours and we can't check and update a thousand panels.
You really should fix this code. As written, having panel.addComponentListener outside of the if block is very bad and will lead to the same listener being added multiple times (a serious bug). This is not something we want to encourage or support. If you are going to use the lazy pattern, use it correctly.