Try like this:-
- (void)windowDidLoad
{
NSRect frameRect = NSMakeRect(10, 20, 200, 20);
NSTextField *theTextField = [[NSTextField alloc] initWithFrame:frameRect];
[theTextField setBezeled:YES];
[theTextField setDrawsBackground:NO];
[theTextField setEditable:NO];
[theTextField setSelectable:YES];
[vw addSubview:theTextField];
[[[self window]contentView]addSubview:vw];
[super windowDidLoad];
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
}