I know I can use this code to tell when the shell is closed,
shell.addShellListener(new ShellAdapter()
{
@Override
public void shellClosed(ShellEvent e)
{
System.out.println("closed");
}
}
But the ShellEvent
object doesn't tell me whether the Shell was closed programmatically or when the user clicked on the X button.
Is there a way to tell?