The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
February 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Use StatusEvent.REPLACED

Posted by Kishori Sharan on February 21, 2001 at 5:15 PM

change the following
switch(event.getType()){
case event.REPLACED;
break;
}

to
switch(event.getType()){
case StatusEvent.REPLACED;
break;
}

In fact all labels for case statements must be a compile time constant. If you write event.REPLACED then it is not the compile time constant. You need to use classname.REPLACED i.e StatusEvent.REPLACED.

Thanx
Kishori




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us