// Trigger global.frame events when activating, deactivating or closing the frame
frame.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
fireEvent(new JaspiraEvent((JaspiraPageContainer) e.getWindow(), "global.frame.close"));
}
public void windowActivated(WindowEvent e)
{
fireEvent(new JaspiraEvent((JaspiraPageContainer) e.getWindow(), "global.frame.activated"));
}
public void windowDeactivated(WindowEvent e)
{
fireEvent(new JaspiraEvent((JaspiraPageContainer) e.getWindow(), "global.frame.deactivated"));
}
});
// Copy the icon to the frame
MultiIcon multiIcon = getIcon();