i am getting an error : java:10: error: AniWorld is not abstract and does not override abstract method mouseMoved(MouseEvent) in MouseMotionListener
public class AniWorld extends Applet implements MouseMotionListener, MouseListener

please help

import java.awt.*;
import java.lang.*;
import java.applet.*;
import java.net.*;
import java.net.MalformedURLException;
import java.applet.Applet.*;
import java.io.IOException;
import java.awt.event.*;

public class AniWorld extends  Applet implements MouseMotionListener, MouseListener
{
	public Stage stage;
	GridBagLayout     layout;
	public void init()
	{
		addMouseMotionListener(this);
		addMouseListener(this);
		setBackground( Color.white );
		layout = new GridBagLayout();
        setLayout( layout );
		int width = Integer.parseInt( getParameter( "width" ).trim() );
		int height = Integer.parseInt( getParameter( "height" ).trim() );
        stage = new Stage( width-10,height-10);
        constrain( stage,this,layout,1,0,1,6,
				   GridBagConstraints.NONE,
				   GridBagConstraints.CENTER,0,0 );

		stage.addBall();
		stage.addRect();
		stage.addArc();
		stage.start();
	}
    public void start()
    {
		stage.start();
    } // end of start()
    public static void constrain(
					 Component     component,
					 Container     container,
					 GridBagLayout layout,
					 int           gridx,
					 int           gridy,
					 int           gridwidth,
					 int           gridheight,
					 int           fill,
					 int           anchor,
					 double        weightx,
					 double        weighty
					 ) {

		GridBagConstraints gbc = new GridBagConstraints();

		gbc.gridx      = gridx;
		gbc.gridy      = gridy;
		gbc.gridwidth  = gridwidth;
		gbc.gridheight = gridheight;
		gbc.fill       = fill;
		gbc.anchor     = anchor;
		gbc.weightx    = weightx;
		gbc.weighty    = weighty;

		layout.setConstraints( component,gbc );

		container.add( component );

	    } // end of constrain()


}

Can you include the Stage class in your code

never mind i forgot to include

public void mouseMoved(MouseEvent e)
	{
		System.out.println("mouse moved");
	}
    public void mouseDragged(MouseEvent e)
    {
        System.out.println("mouse is being dragged  ");
    }
    public void mouseClicked(MouseEvent e)
    {
        System.out.println("mouse is being dragged  ");
    }

thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.