This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
Re: Problem with setting Fonts with the latest CVS
- To: wheineman at uconect dot net
- Subject: Re: Problem with setting Fonts with the latest CVS
- From: Marco Vezzoli <marco dot vezzoli at st dot com>
- Date: Fri, 02 Jun 2000 16:45:58 +0200
- Cc: kawa at sourceware dot cygnus dot com
- Organization: sgs-thomson
- References: <3937C367.3860BAE8@uconect.net>
With kawa 1.6.66 jdk 1.2 on Solaris everything works fine.
Marco
wheineman@uconect.net wrote:
>
> Hi,
> I'm getting an error when I attempt to set fonts for swing components
> with the lasest CVS version that I don't get with 1.6.6. The following
> code:
>
> ;; Create a JTextArea object
> (define textarea (make <javax.swing.JTextArea>))
> (invoke (as <javax.swing.JTextArea> textarea)
> 'setLineWrap #f)
> (invoke (as <javax.swing.JTextArea> textarea)
> 'setEditable #f)
> (define myfont (make <java.awt.Font>
> (as <java.lang.String> "Monospaced")
> (static-field <java.awt.Font> 'PLAIN) 12))
> (display myfont)
> (newline)
> (invoke (as <javax.swing.JTextArea> textarea)
> 'setFont (as <java.awt.Font> myfont))
>
> yields the following:
>
> java.awt.Font[family=monospaced,name=Monospaced,style=plain,size=12]
> Argument to `javax.swing.JTextArea.setFont' has wrong type
> at gnu.expr.GenericProc.applyN(GenericProc.java:67)
> at gnu.kawa.reflect.Invoke.applyN(Invoke.java, Compiled Code)
> at gnu.kawa.reflect.Invoke.applyN(Invoke.java, Compiled Code)
> at gnu.expr.ApplyExp.eval(ApplyExp.java, Compiled Code)
> at gnu.expr.ModuleExp.evalModule(ModuleExp.java, Compiled Code)
> at kawa.Shell.run(Shell.java:85)
> at kawa.standard.load.loadSource(load.java:124)
> at kawa.standard.load.loadSource(load.java:102)
> at kawa.standard.load.apply(load.java:173)
> at kawa.Shell.runFile(Shell.java:124)
> at kawa.repl.main(repl.java:350)
>
> Hope this is helpful,
>
> Willy Heineman
--
(--cafe babe--)
Marco Vezzoli marco.vezzoli@st.com
CR&D Intranet Developement STMicroelectronics
tel. +39 039 603 6852 fax. +39 039 603 5055