Re: NSView requisites in java documentation
Re: NSView requisites in java documentation
- Subject: Re: NSView requisites in java documentation
- From: Scott Anguish <email@hidden>
- Date: Sat, 1 Sep 2001 18:59:58 -0400
On Saturday, September 1, 2001, at 03:43 PM, email@hidden wrote:
I am working with NSViews and other things as well that use NSRect and
things like it. I realized that it was a Java class and only in the
Java documentation. I don't know very much about Java at all and can't
figure out how to use NSRect in Objective-C without using a NSScreen's
rect method (the one that returns the size of the screen). All I want
to do is to be able to make a NSRect, initialize it with a certain
size, and use it in my application. I know it can be done.
In Objective-C NSRect is just a structure.. Java doesn't have this,
so in Java it is an object.
You can just declare an NSRect and fill it like this in Objective-C
NSRect myRect;
myRect=NSMakeRect(x,y,width,height);
or, you can assign the fields directly