Common and multiple frames

Is there a mechanism to have multiple frames controlled by a single CControl? I am working on an application that will be used in a multiple monitor environment. Using the core library, I was able to easily create such an application and even drag-and-drop between dock stations on different frames. I don’t see a similar capability using the common library.

That should be possible. There will be one frame that is used as owner for all the JDialogs, but this also happens with the Core library.

Some code how this could look like:


import javax.swing.JFrame;

import bibliothek.gui.dock.common.CControl;
import bibliothek.gui.dock.common.CGrid;
import bibliothek.gui.dock.common.DefaultSingleCDockable;

public class Dock9 {
	public static void main( String[] args ){
		JFrame frame1 = new JFrame();
		JFrame frame2 = new JFrame();
		
		CControl control = new CControl( frame1 );
		
		frame1.add( control.getContentArea() );
		frame2.add( control.createContentArea( "2" ) );
		
		CGrid grid = new CGrid( control );
		grid.add( 0, 0, 1, 1, new DefaultSingleCDockable( "a", "a" ) );
		grid.add( 0, 1, 1, 1, new DefaultSingleCDockable( "b", "b" ) );
		grid.add( 0, 2, 1, 1, new DefaultSingleCDockable( "c", "c" ) );
		
		control.getContentArea().deploy( grid );
		
		frame1.setBounds( 20, 20, 200, 500 );
		frame2.setBounds( 250, 20, 200, 500 );
		
		frame1.setVisible( true );
		frame2.setVisible( true );
	}
}