This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Low-level access to Java objects - Instantiating Objects


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]