Dragging dockables to a second screen causes them to disappear

I have the Notes demo from demonstration.jar (http://dock.javaforge.com/webstart/demo/demo.zip) on desktop 1.

I grab the About dockable and move it to the second screen (desktop 2). The tutorial window goes all white except the dockables’ titles and the About dockable disappears.

The same thing happens with the latest code (http://dock.javaforge.com/dockingFrames_v1.1.1/df_1.1.1p7d.zip).

Windows 7 32 bit, no exception is shown in console. Repeatable every time.

In the end the framework just uses JFrames and JDialogs, there is no “dangerous” code. But you are not the first with these issues, unfortunately I have no clue how to fix it.

It could be interesting to run the application below, it is a JFrame and a button. Click the button, and a new JDialog opens. The dialog should show up on your second monitor (you might need to change the “setLocation” method). Is this working? If not, then the bug is not caused by the framework itself.

package forum;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;

public class MonitorTest {
	public static void main(String[] args) {
		final JFrame frame = new JFrame("Test");
		JButton button = new JButton( "Open Dialog" );
		frame.add(button);
		frame.pack();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		button.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				JDialog dialog = new JDialog(frame);
				dialog.setUndecorated(true);
				dialog.add(new JButton("nothing"));
				dialog.pack();
				dialog.setLocation(2100, 0); // you will need to edit this line
				dialog.setVisible(true);
			}
		});
		
		
		frame.setVisible(true);
	}
}

[QUOTE=Beni]In the end the framework just uses JFrames and JDialogs, there is no “dangerous” code. But you are not the first with these issues, unfortunately I have no clue how to fix it.

It could be interesting to run the application below, it is a JFrame and a button. Click the button, and a new JDialog opens. The dialog should show up on your second monitor (you might need to change the “set”
[/QUOTE]

Sorry for the late reply. The example you gave is working correctly.

If I drag one of the panels outside the application but still on the first screen, it works correctly.

I’ve noticed I can get the “disappeared” panels to reappear if I take a second panel from the main program and hover it over the panel that disappeared.

Also it seems after causing a panel to reappear, the docking framework works correctly afterwards

Does resizing or moving around the window have any effect? Maybe it’s just a call to “repaint” that is missing or not executed properly.