What is the purpose of action interface in Swing?
Submitted by: Administrator
Action is performed on a state to allow it to change. It defines the interface that it is implementing. The library that is used for the action interface is javax.swing.Action. This action interface extends the ActionListener interface class that is being provided from the AWT. Action interface allow the concrete classes to implement the actionPerformed() method and provide the action that is associated with it. The use of actionPerformed() method allow the implementation of the behavior that is desired in the programming and allow it to show the functionality of the action class. The action can be added to the container class that accepts the parameters on an event like JMenu, JPopupMenu, or JtoolBar. The container used in this automatically registers the action that is taken on the event and it acts as an ActionListener of the user interface.
Submitted by: Administrator
Read Online Swing AWT Job Interview Questions And Answers