Blink Dockable when opened

Hi Beni,

What I am trying to acheive is,
When I do an event in one dockable, another dockable gets added as an tab.
I want to make keep the focus on the original tab and the new tab should be added without getting focus and show appear to blink.

can you tell me if any such support is available in common?

Thanks,
Bhavin

Just make the old Dockable again focused really fast. If the focus change happens faster than Swing paints, the user can’t see it. This should work:

	private int count = 0;
	
	public static void main( String[] args ){
		new Dock1();
	}
	
	public Dock1(){
		JFrame frame = new JFrame();
		
		// setup a controller and a few dockables

		final CControl control = new CControl( frame );
		frame.add( control.getContentArea() );
		
		JButton add = new JButton( "Add dockable" );
		add.addActionListener( new ActionListener(){
			public void actionPerformed( ActionEvent e ){
				Dockable old = control.intern().getController().getFocusedDockable();
				String id = String.valueOf( count++ );
				DefaultSingleCDockable dockable = new DefaultSingleCDockable( id, id );
				control.add( dockable );
				dockable.setLocation( CLocation.base().normal() );
				dockable.setVisible( true );
				if( old != null ){
					control.intern().getController().setFocusedDockable( old, true );
				}
			}
		});
		frame.add( add, BorderLayout.NORTH );

		frame.setBounds( 20, 20, 500, 300 );
		frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );

		frame.setVisible( true );
	}
}```