Article View: borland.public.jbuilder.java.language
Article #15230static method calls
From: Luke Plemmons
Date: Wed, 07 Jul 1999 00:00
Date: Wed, 07 Jul 1999 00:00
66 lines
3187 bytes
3187 bytes
--------------3BF1435AD0327D9A63C17143
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi! I'm having some problems getting static methods to run using
JBuilder 3. Here's an example of a method in an Alignment utilities
class I wrote:
public static Point centerInFrame(Rectangle parentBounds, Dimension
childSize) {
int x = (parentBounds.width - childSize.width) / 2 +
parentBounds.x;
int y = (parentBounds.height - childSize.height) / 2 +
parentBounds.y;
return new Point(x, y);
}
And here's the line of code where I call the method:
Point point = Alignment.centerInFrame(getBounds(),
reportPropertiesDialog.getSize());
This code worked just fine in JBuilder 2, but when I switched over to
JBuilder 3 I started getting the following error message every time I
called this method:
java.lang.VerifyError(class: plemmons/util/Alignment, method: _$372
signature: ()V) Expecting to find uninitialized object on stack.
Has anyone else out there experience this problem and figured out a way
to fix it? I'd appreciate any help!
Greg Coates
--------------3BF1435AD0327D9A63C17143
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<tt>Hi! I'm having some problems getting static methods to run using
JBuilder 3. Here's an example of a method in an Alignment utilities
class I wrote:</tt><tt></tt>
<p><tt> public static Point centerInFrame(Rectangle parentBounds,
Dimension childSize) {</tt>
<br><tt> int x = (parentBounds.width - childSize.width)
/ 2 + parentBounds.x;</tt>
<br><tt> int y = (parentBounds.height - childSize.height)
/ 2 + parentBounds.y;</tt>
<br><tt> return new Point(x, y);</tt>
<br><tt> }</tt><tt></tt>
<p><tt>And here's the line of code where I call the method:</tt>
<br><tt>Point point = Alignment.centerInFrame(getBounds(),
reportPropertiesDialog.getSize());</tt>
<br><tt></tt> <tt></tt>
<p><tt>This code worked just fine in JBuilder 2, but when I switched over
to JBuilder 3 I started getting the following error message every time
I called this method:</tt><tt></tt>
<p><tt>java.lang.VerifyError(class: plemmons/util/Alignment, method: _$372
signature: ()V) Expecting to find uninitialized object on stack.</tt><tt></tt>
<p><tt>Has anyone else out there experience this problem and figured out
a way to fix it? I'd appreciate any help!</tt><tt></tt>
<p><tt>Greg Coates</tt></html>
--------------3BF1435AD0327D9A63C17143--
Technical Details
Message-ID:
<37837333.BE60A99F@csi.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,fec110f57b6f2f0c,start X-Google-Attributes: gidf74b3,public From: Luke Plemmons <lplemmons@csi.com> Subject: static method calls Date: 1999/07/07 Message-ID: <37837333.BE60A99F@csi.com> X-Deja-AN: 498181088 X-Accept-Language: en Content-Type: multipart/alternative; boundary="------------3BF1435AD0327D9A63C17143" Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language