Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Model Listener

Status
Not open for further replies.

shomila

Technical User
Joined
Jan 5, 2007
Messages
5
Location
GB
Hi

Could someone please help. I have an error "<identifier> expected", while trying to compile the following code:


class ShapeCanvas extends Canvas implements ActionListener, MouseListener, MouseMotionListener, UMLModelListener
{
UMLModel myModel = new UMLModel();
myModel.addUMLModelListener(new UMLModelListener()
{
public void UMLModelChanged(final UMLModel myModel)
{
repaint();
}
});
...



I have the following file; Model.java file/ UMLModel.java/ UMLModelListener.java


Could someone please help me and tell me what the problem is. Thanks

 
declare ShapeClass as public; UMLModelListener as public interface
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top