---
title: "showWindow(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindowcontroller/showwindow(_:)"
---

# showWindow(_:)

Displays the window associated with the receiver.

## Declaration

```swift
@IBAction func showWindow(_ sender: Any?)
```

## Parameters

- `sender`: The control sending the message; can be nil.

## Discussion

Discussion If the window is an NSPanel object and has its becomesKeyOnlyIfNeeded flag set to true, the window is displayed in front of all other windows but is not made key; otherwise it is displayed in front and is made key. This method is useful for menu actions.

## See Also

### Related Documentation

- [orderFront(_:)](appkit/nswindow/orderfront(_:).md)
- [makeKeyAndOrderFront(_:)](appkit/nswindow/makekeyandorderfront(_:).md)

### Loading and Displaying the Window

- [loadWindow()](appkit/nswindowcontroller/loadwindow().md)
- [isWindowLoaded](appkit/nswindowcontroller/iswindowloaded.md)
- [window](appkit/nswindowcontroller/window.md)
- [windowDidLoad()](appkit/nswindowcontroller/windowdidload().md)
- [windowWillLoad()](appkit/nswindowcontroller/windowwillload().md)
