I have a java swing application which has a processWindowEvent method. 
below is the snippet

```
@Override
  protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
        //exit application with proper error message
    }
  }

```

Now when my swing application is launched in windows.

1. close with the cross in swing UI. ==> proper error message is shown
2. close the application from taskbar ==>proper error message is shown

but now if the same step is done in mac.

3. close with the cross in swing UI. ==> proper error message is shown
4. close the application from taskbar ==>does not come inside above method. So no proper message.

I wanted to know what is the default method which will be called in mac when java swing app is closed from taskbar(the dock)