-
Bug
-
Resolution: Fixed
-
P3
-
1.0
-
1.0.2
-
sparc
-
solaris_2.5
-
Not verified
From: John Neilson <###@###.###>
This does not look like form output to me.
I'm using the Mac JDK, and the fillPolygon methods I'm trying to use
throw ArrayIndexOutOfBoundsExceptions when I run the applet in the
AppleViewer (e.getMessage() just gives me "null").
I uploaded the same program to our Sun and the applet ran with no
problem and the Polygons drew as they were supposed to.
Here is the code:
/////////////////////////////////////////////////////////////////
int[] wallFloorXPoints = {startX, startX+Xoffset, startX+(wallWidth+Xoffset), startX+wallWidth};
int[] wallFloorYPoints = {startY, startY-Yoffset, startY-Yoffset,
startY};
int numWallFloorPoints = wallFloorXPoints.length;
wallFloor = new Polygon(wallFloorXPoints, wallFloorYPoints,
numWallFloorPoints);
g.setColor(wallFloorColor);
try {
g.fillPolygon(wallFloor);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println("an exception occurred: " +
e.getMessage());
e.printStackTrace();
}
/////////////////////////////////////////////////////////////////
here is stderr (for 6 different polygons):
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.drawBar(QuickAudit.java)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.drawBar(QuickAudit.java)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.drawBar(QuickAudit.java)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.drawBar(QuickAudit.java)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
Hope this helps!
John Neilson
Internet Services Developer
This does not look like form output to me.
I'm using the Mac JDK, and the fillPolygon methods I'm trying to use
throw ArrayIndexOutOfBoundsExceptions when I run the applet in the
AppleViewer (e.getMessage() just gives me "null").
I uploaded the same program to our Sun and the applet ran with no
problem and the Polygons drew as they were supposed to.
Here is the code:
/////////////////////////////////////////////////////////////////
int[] wallFloorXPoints = {startX, startX+Xoffset, startX+(wallWidth+Xoffset), startX+wallWidth};
int[] wallFloorYPoints = {startY, startY-Yoffset, startY-Yoffset,
startY};
int numWallFloorPoints = wallFloorXPoints.length;
wallFloor = new Polygon(wallFloorXPoints, wallFloorYPoints,
numWallFloorPoints);
g.setColor(wallFloorColor);
try {
g.fillPolygon(wallFloor);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println("an exception occurred: " +
e.getMessage());
e.printStackTrace();
}
/////////////////////////////////////////////////////////////////
here is stderr (for 6 different polygons):
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.drawBar(QuickAudit.java)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.drawBar(QuickAudit.java)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.drawBar(QuickAudit.java)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
java.lang.ArrayIndexOutOfBoundsException
at java.awt.Graphics.fillPolygon(Graphics.java:383)
at QuickAudit.drawBar(QuickAudit.java)
at QuickAudit.paint(QuickAudit.java)
at sun.awt.macos.MComponentPeer.paint(MComponentPeer.java)
at sun.awt.macos.MComponentPeer.handleExpose(MComponentPeer.java)
Hope this helps!
John Neilson
Internet Services Developer