Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6841899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:01:31+00:00 2026-05-27T00:01:31+00:00

I am getting an error : AniWorld is not abstract and does not override

  • 0

I am getting an error :

AniWorld is not abstract and does not override abstract method mouseMoved(MouseEvent) in MouseMotionListener
public class AniWorld extends  Applet implements MouseMotionListener, MouseListener

The code is:

 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()

public void mouseEntered(MouseEvent e) {}
public void mouseExited(MouseEvent e) {}
public void mousePressed(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {}
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:01:32+00:00Added an answer on May 27, 2026 at 12:01 am

    You have to implement (or at least leave a blank implementation for) the methods MouseDragged(MouseEvent e) and MouseMoved(MouseEvent e) because you’re implementing the MouseMotionListener interface.

    Here the documentation for MouseMotionListener

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting error from devise User does not respond to 'devise' method when running
I am getting error as Entitlements does not match. Here I am using developers
Getting error at line [theSelectedRoutine addExerciseObject: exercise]; saying method -addExerciseObject not found. Interface: @property
Getting error with the following code: import java.util.Scanner; public class FahrenheitToCelsius{ public static void
i am getting error : Error 1 The type or namespace name'CreateUser' does not
I am getting error schema does not yet agree while creating new key-space on
I am getting error the modifier public is not valid for this item this
getting error: ActiveRecord::StatementInvalid (PGError: ERROR: argument of HAVING must be type boolean, not type
I'm getting error C3095: 'Xunit::Extensions::InlineDataAttribute': attribute cannot be repeated in C++/CLI code but not
Getting error with Could not find endpoint element with name 'CaseJacketPort' and contract 'GrandJuryService.CaseJacket'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.