Installing Eclipse theme causes NPE when glass extension is in the build path

Using docking frames 1.1.1 or 1.1.2 preview 4, I’m getting a NullPointerException when trying to install EclipseTheme with glass extension on the build path. My minimal program begins with the following:

JFrame frame = new JFrame();
DockFrontend frontEnd = new DockFrontend(frame);
DockController controller = frontEnd.getController();
DockTheme theme = new EclipseTheme();

The setTheme method will not complete. The top of the stack is:

at glass.eclipse.theme.EclipseThemeExtension.install(Unknown Source)
at bibliothek.gui.dock.themes.BasicTheme.install(
at bibliothek.gui.dock.themes.ThemeManager.setTheme(
at bibliothek.gui.DockController.setTheme(
at testdock.Minimal.exec(

Inside the EclipseTheme.install, the local variable 'version; is null, the subsequent call to version.setFactory causes an NPE to be thrown.

public void install (DockController controller, DockTheme theme) {
      DockTitleManager manager = controller.getDockTitleManager();
      DockTitleVersion version = manager.getVersion(FlapDockStation.BUTTON_TITLE_ID);
      version.setFactory(CGlassDockTitleFactory.FACTORY, Priority.CLIENT);

I can run your demo programs with glass extension; how do I ensure that FlapDockStation.BUTTON_TITLE_ID is initialized?

Thanks for the bug report, I’ll have that fixed in the next release (uploading it this weekend).

I would highly suggest you make use of the Common API, instead of only the Core API. Common offers many more features without any additional configuration (minimization, proper tracking of locations, persistency). Just use “CControl” instead of “DockFrontend”, and “CDockables” instead of “Dockables”.
There is a project with named “docking-frames-demo-tutorial”, it can show you how to use Common (and please do ask in the forum if you have troubles).

If you insist of using only Core, then this piece of code will make sure “version” is not null:

		DockFrontend frontEnd = new DockFrontend(frame);
		DockController controller = frontEnd.getController();

		// force initialization of the "version"
		controller.getDockTitleManager().registerClient( FlapDockStation.BUTTON_TITLE_ID, null );

		DockTheme theme = new EclipseTheme();