JFrame defaultFrame = (JFrame)window;
// Create a dialog with the same title as home frame
final JDialog separateDialog = new JDialog(defaultFrame, defaultFrame.getTitle(), false,
component.getGraphicsConfiguration());
separateDialog.setResizable(true);
defaultFrame.addPropertyChangeListener("title", new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent ev) {
separateDialog.setTitle((String)ev.getNewValue());
}
});
// Use same document modified indicator