this.setSize(800, 600);
}
protected JPanel createToolWindowManager() {
// Create a new instance of MyDoggyToolWindowManager passing the frame.
MyDoggyToolWindowManager vDockingToolWindow = new MyDoggyToolWindowManager();
// Register a Tool.
vDockingToolWindow.registerToolWindow("Docking-Demo", // Id
"Docking-Demo", // Title
null, // Icon
createDockablePanel(), ToolWindowAnchor.LEFT); // Anchor
ToolWindow vToolWindow = vDockingToolWindow.getToolWindow(1);
vToolWindow.getTypeDescriptor(DockedTypeDescriptor.class).setDockLength(250);
vToolWindow.setVisible(true);
vDockingToolWindow.getContentManager().addContent("Hello World", "Hello World", null,
new JLabel("Hello World!"));
// Make all tools available
for (ToolWindow window : vDockingToolWindow.getToolWindows()) {
window.setAvailable(true);
}
return vDockingToolWindow;
}