In part 1, you saw Jesse Glick's solution for a JDesktopPane on the NetBeans Platform. I've been playing with the latest sources he's provided, which now work on 7.1:
So, now, when "Win1" is selected below, dedicated menu items and toolbar buttons appear in the main window:
...while, if Win2 is selected, other menu items and toolbar buttons are shown/hidden:
If interested in this functionality, download the sources from the link above.