This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Low-level access to Java objects - Instantiating Objects
- From: Jim White <jim at pagesmiths dot com>
- To: roland at motorola dot com
- Cc: kawa at sources dot redhat dot com
- Date: Fri, 11 Jul 2003 18:59:57 -0700
- Subject: Re: Low-level access to Java objects - Instantiating Objects
- References: <3F0F6B00.7000205@motorola.com>
Roland Besserer wrote:
In Jython, I can do the following:
import javax.swing as swing // associates java package
with a name
win = swing.JFrame("Hello") // calls the JFrame constructor
win.size = (200,200)
win.show
Ok, that wouldn't work the same way in kawa and one would translate the
call: win.size = (200, 200) to setSize() but the real problem I have is
that I have not figured out how to actually construct the win object.
The "high level" (invoke et al):
http://www.gnu.org/software/kawa/Allocating-objects.html#Allocating%20objects
(make <java.lang.Integer> 112)
Or "low level":
http://www.gnu.org/software/kawa/Low-level-Method-invocation.html#Low-level%20Method%20invocation
(define new-int (primitive-constructor <java.lang.Integer> (<int>)))
(new-int 10)
Jim
--
"I love deadlines. I love the whooshing sound they make as they fly by."
-- Douglas Adams