-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.1.6
-
generic
-
generic
Name: vi73552 Date: 03/23/99
Error Message:
A non-fatal internal JIT(3.000.39(x))error "Storage Decomit fault"
has occured in sun/tools/javac/SourceClass.addField
(Lsun/tools/java/Environment;Lsun/tools/java/Field Definition;)
V: Interpreting method please report error in detail to
http://java.sun.com/cgi-bin/bugreport.cgi
Source Code:
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
public class StopLight extends Applet implements ActionListener{
Label welcome=new Label("Welcome to Gareth's Stop Light");
Button start=new Button("Start");
Font bFont=new Font("TimesRoman",Font.ITALIC+Font.BOLD,25);
Color [] tColor={Color.red,Color.yellow,Color.green};
public void init()
{
welcome.setFont(bFont);
add(welcome);
add(start);
start.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
repaint();
}
public void paint(Graphics g)
{
Dimension d=getSize();
int w=d.width;
int h=d.height;
boolean a=false, b=false, c=false;
g.drawfillRect(w/2-40,h/2-60,40,120);
for(int i=0; i<3; i++)
{
g.setColor(tColor[i]);
switch(i)
{
case 0: a=true;break;
case 1: b=true;break;
case 2: c=true;break;
default: a=false;b=false;c=false;
}
g.fill3DOval(w/2-40,h/2-60,40,40,a);
g.fill3DOval(w/2-40,h/2-20,40,40,b);
g.fill3DOval(w/2-40,h/2+20,40,40,c);
}
}
}
Output of "java -fullversion" :
java full version JDK1.1.6N
(Review ID: 55957)
======================================================================