A NPE is thrown on MacOS X when Docking Windows 1.4.0
is used. The exception gets thrown in several
occasions, all leading to a NPE starting from
InternalDockingUtil.updateButtons. The exception is
nonly reproducible on MacOS X running Java 5, not on
Windows XP SP2.
4 different stacktraces leading to the same error
Logged In: YES
user_id=140786
Here is the code, that leads to the NPE at the line where
the new tab window is created:
public static RootWindow createParentChildDisplay(final
JComponent listPanel, final ViewMap views) {
final TabbedPanel tabbedPanel = new TabbedPanel();
tabbedPanel.addTab(new Tab(listPanel));
final View listView = new View("", null, tabbedPanel);
listView.getViewProperties().setAlwaysShowTitle(false);
views.addView(0, listView);
final RootWindow rootWindow =
DockingUtil.createRootWindow(views, true);
setBasicRootWindowProps(rootWindow);
configureProperties(rootWindow, false, false, false,
false, false, false);
final RootWindowProperties rootWindowProperties =
rootWindow.getRootWindowProperties();
final TabWindowProperties properties =
rootWindowProperties.getTabWindowProperties();
tabbedPanel.getProperties().addSuperObject(properties.getTabbedPanelProperties());
// Make sure to create the TabWindow AFTER the
RootWindow, otherwise the content will be empty!
final View[] windows = (View[])
ArrayUtils.remove(toArray(views), 0, new View[0]);
final TabWindow rightTabs = new TabWindow(windows);
rightTabs.setSelectedTab(0);
rootWindow.setWindow(new SplitWindow(true, listView,
rightTabs));
rootWindowProperties.getWindowAreaProperties().setBackgroundColor(rootWindowProperties.getComponentProperties().getBackgroundColor());
return rootWindow;
}
Logged In: YES
user_id=140786
With version 1.3 it workes without any problem.