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

  • Home
  • SEARCH
  • 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 8662407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:43:52+00:00 2026-06-12T16:43:52+00:00

Class AbstractAction implements interface Action , but in Action , there’s a method actionPerformed(ActionEvent

  • 0

Class AbstractAction implements interface Action, but in Action, there’s a method actionPerformed(ActionEvent e) which inherits from interface ActionListener
I know that the class implements an interface must supply all the implementations of methods in that interface
But I found that there’s no implementation of actionPerformed(ActionEvent e) in AbstractAction, why ?

  • 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-06-12T16:43:53+00:00Added an answer on June 12, 2026 at 4:43 pm

    AbstractAction is an abstract class so it doesn’t have to implement all of the methods on the interface. Abstract classes can’t be instantiated so they can’t be used without creating a subclass of it. Only concrete classes (ie non-abstract) have to provide an implementation of all methods of an interface. If you subclass AbstractAction your subclass will have to implement actionPerformed() or it will have to be abstract too.

    Now those are the rules, but it doesn’t make sense for AbstractAction to implement actionPerformed() because it couldn’t possibly provide a useful implementation. Every subclass would have to override it’s definition which makes it a good candidate for being marked abstract.

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

Sidebar

Related Questions

I have to open a page from class extended from javax.swing.AbstractAction class... Is that
I have a actionSave class which extends AbstractAction.I use it for save button. somewhere
class StartAction(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): print "Hello" start.add_argument('-s', '--start', action=StartAction) I
How would I go about writing a constructor for an inner class which is
In my game, there is are ActionFactory (makes AbstractActions), AbstractAction (actions that could exist),
Class A calls the public method f() in the Constructor. Class B overrides method
class Test extends JPanel implements MouseListener { private JButton b1, b2, b3, b4; public
I have a JButton that's attached to an ActionListener, but I also wanted to
I am about to refactor a Swing application from using ActionListeners to Action classes
class Foo(models.Model): title = models.CharField(max_length=20) slug = models.SlugField() Is there a built-in way to

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.