Forgive me for excavating this 14 years old
thread, but I have some useful code that can help future Googlers. This thread is in top 5 for "disable all jpanel components" phrase.
The code provided by Gregg works fine, but it will not disable components in nested containers.
Here is a recursive method that extracts all the components from given container, including components in nested containers:
Later the components can be disabled this way: