Closing All Internal Frames in JCAPS

One weekend a little while ago I got really bored and started digging around with the JCAPS Netbeans designer. If you’ve ever worked with it, you know this problem all too well. After several hours of tinkering I came up with a plugin to remedy this.

Here is the jist of it:

First:


Set<TopComponent> windows = WindowManager.getDefault().getRegistry().getOpened();

Next:

Recurse the object tree, if it is a JInternalFrame or JInternalFrame.JDesktopIcon then minimize it, or maximize it depending on what you are trying to do.

Leave a comment