Next: 2.5 Integrating the window Up: 2 Adding a Window Previous: 2.3 Setting the title

2.4 Ordering Front a window

Creating a window does not make it visible. The window is ready to be used, but it is not visible till you invoke the orderFront: method, as in:
[myWindow orderFront: nil];
Note that orderFront: takes an object argument so that it can be invoked as an action from a button or a menu item, but the argument is usually ignored, which is why we simply use nil for it.

If you want your window to be ordered front and to get the keyboard focus, you do:

[myWindow makeKeyAndOrderFront: nil];



2008-01-16