Dragging external disappears

I am testing DockingFrames with a small demo program based on the tutorial provided.
I am experiencing an issue I believe is due to developing on a machine with two displays.

When I run my test demo, it comes up with multiple frames in various states (docked, external).

Scenario 1(no issue):
The test demo exists on display 1. I drag a docked from to become externalized from display 1 to display 1, everything is fine.
Scenario 2 (issue experienced):
The test demo exists on display 1. If I drag a docked frame to become externalized from display 1 to display 2, the frame becomes invisible. The frame still exists (if you click and drag where the frame was last dropped, it will be found); it can then be dragged back onto the content pane.
Scenario 3 (no issue):
The test demo exists on display 2. I drag a docked frame to become externalized from display 2 to display 1, everything is fine.
Scenario 4 (no issue):
The test demo exists on display 2. I drag a docked frame to become externalized from display 2 to display 2, everything is fine.

Any assistance would be greatly appreciated. Thanks!

The framework just opens a new undecorated JDialog wherever you drop the Dockable, there is nothing special happening. Unfortunately I do not have a second monitor, so I cannot test anything :-/

Hm, if you have one JFrame on display 1, and open an undecorated JDialog (see “JDialog.setUndecorated”) on display 2 (with the frame as parent), does that work?

I hope this is what you meant:

[LEFT]import**[/SIZE] java.awt.event.ActionEvent;[/LEFT]
**[SIZE=2][LEFT]import**[/SIZE] java.awt.event.ActionListener;
**[SIZE=2][LEFT]import**[/SIZE] javax.swing.JButton;[/LEFT]
**[SIZE=2][LEFT]import**[/SIZE] javax.swing.JDialog;[/LEFT]
**[SIZE=2][LEFT]import**[/SIZE] javax.swing.JFrame;[/LEFT]
**[SIZE=2][LEFT]import**[/SIZE] javax.swing.JLabel;

**[SIZE=2][LEFT]public**[/SIZE] **[SIZE=2]class**[/SIZE] UndecoratedTest {

**[SIZE=2]public**[/SIZE] **[SIZE=2]static**[/SIZE] **[SIZE=2]void**[/SIZE] main(String[] args) {

**[SIZE=2]final**[/SIZE] JFrame frame = **[SIZE=2]new**[/SIZE] JFrame([SIZE=2]"Frame"[/SIZE]);


JButton button = **[SIZE=2]new**[/SIZE] JButton([SIZE=2]"Press"[/SIZE]);

button.addActionListener(**[SIZE=2]new**[/SIZE] ActionListener(){

[/SIZE][LEFT]**[SIZE=2]public**[/SIZE] **[SIZE=2]void**[/SIZE] actionPerformed(ActionEvent e) {

JDialog dialog = **[SIZE=2]new**[/SIZE] JDialog(frame, [SIZE=2]"Palette"[/SIZE]);
JLabel label = **[SIZE=2]new**[/SIZE] JLabel([SIZE=2]"HIIIIIIIIIIIIIIIIIIIII"[/SIZE]);
dialog.setLocation(2000, 0);



Doing this pops up the undecorated JDialog on the second screen with text “HIIIIIIIIIIIIIIIIIIIII”, fully visible… of course also unmoveable.
I also ran it without the frame as the parent (just created new JFrame instead) and that had the same result.

I admit of being completely lost…

Out of curiosity, and fishing in the dark: if you run this program, do you have any different results? And what if you remove the lines with the “comment me out” comment?

import javax.swing.JFrame;

import bibliothek.gui.DockController;
import bibliothek.gui.dock.DefaultDockable;
import bibliothek.gui.dock.ScreenDockStation;
import bibliothek.gui.dock.SplitDockStation;
import bibliothek.gui.dock.station.screen.window.DefaultScreenDockWindowFactory;
import bibliothek.gui.dock.station.screen.window.DefaultScreenDockWindowFactory.Kind;

public class ScreenDockTest {
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		DockController controller = new DockController();
		DefaultScreenDockWindowFactory factory = new DefaultScreenDockWindowFactory();
		// line 1 to test and comment out
		// line 2 to test and comment out
		// setting the modified factory
		controller.getProperties().set(ScreenDockStation.WINDOW_FACTORY, factory);
		SplitDockStation center = new SplitDockStation();
		ScreenDockStation screen = new ScreenDockStation(controller.getRootWindowProvider());
		DefaultDockable dockable = new DefaultDockable("Test, drag me");