Java Reference
In-Depth Information
Summary of Classes and Interfaces
5
This appendix summarizes most of the library classes used in this topic. This appendix
includes some methods, and even some classes, that are not discussed in the text.
The lists of class methods and other class members contain the most commonly
used members and the members used in this topic, but they are not complete lists of
methods for the classes given here.
If a class or interface is derived from another class or interface, respectively, then in
some cases, the table for the derived class or interface lists only new methods and does
not list all the inherited methods.
Abstract Button
Package: javax.swing
The classes JButton and JMenuItem are also in this package.
All these methods are inherited by the classes JButton and JMenuItem .
AbstractButton is an abstract class.
Ancestor classes:
Object
|
+--Component
|
+--Container
|
+--JComponent
|
+AbstractButton
|
+--JButton
+--JMenuItem
public void addActionListener(ActionListener listener)
Adds an ActionListener .
public String getActionCommand()
Returns the action command for this component.
public String getText()
Returns the text written on the component, such as the text on a button or the string for a menu item.
public void removeActionListener(ActionListener listener)
Removes an ActionListener .
public void setActionCommand(String actionCommand)
Sets the action command.
 
 
Search WWH ::




Custom Search