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: Willy Heineman <wheineman at uconect dot net>
- Subject: Re: Problem with setting Fonts with the latest CVS
- From: Per Bothner <per at bothner dot com>
- Date: 03 Jun 2000 23:36:33 -0700
- Cc: kawa at sourceware dot cygnus dot com
- References: <3937C367.3860BAE8@uconect.net>
Willy Heineman <wheineman@uconect.net> writes:
> 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:
> ...
> 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)
This patch should fix the problem.
Index: MethodProc.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/MethodProc.java,v
retrieving revision 1.5
diff -u -r1.5 MethodProc.java
--- MethodProc.java 2000/05/23 01:48:46 1.5
+++ MethodProc.java 2000/06/04 06:42:12
@@ -111,13 +111,13 @@
Type t1 = proc1.getParameterType(i);
Type t2 = proc2.getParameterType(i);
int comp = t1.compare(t2);
- if (comp != 1)
+ if (comp == -1)
{
not2 = true;
if (not1)
return null;
}
- if (comp != -1)
+ if (comp == 1)
{
not1 = true;
if (not2)
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/