KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > awt > Button

java.awt
Class Button

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Button
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
See Also:
Top Examples, Source Code, ActionEvent, ActionListener, Component.processMouseEvent(java.awt.event.MouseEvent), Component.addMouseListener(java.awt.event.MouseListener)

public void addActionListener(ActionListener l)
See Also:
getActionListeners(), removeActionListener(java.awt.event.ActionListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void addNotify()
See Also:
Component.getToolkit(), Toolkit.createButton(java.awt.Button)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Button()
       throws HeadlessException
See Also:
GraphicsEnvironment.isHeadless()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[433]Create a button
By Yilmaz Mete on 2005/01/27 18:54:45  Rate
Button b = new Button (  ) ; 
 b.addActionListener (  new ActionListener (  )  {  
   public void ActionPerformed ( ActionEvent ae )   { /*do anything*/ }                   
  }  ) ; 
 


public Button(String label)
       throws HeadlessException
See Also:
GraphicsEnvironment.isHeadless()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[2018]Button_Example
By jinyong1112 { at } 126 { dot } com on 2011/10/13 19:21:09  Rate
Button b = new Button ( "test" ) ; 
 b.setText ( "button" ) ;


public AccessibleContext getAccessibleContext()
See Also:
Component, Accessible
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getActionCommand()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ActionListener[] getActionListeners()
See Also:
removeActionListener(java.awt.event.ActionListener), addActionListener(java.awt.event.ActionListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getLabel()
See Also:
setLabel(java.lang.String)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public <T extends EventListener> T[] getListeners(Class<T> listenerType)
See Also:
getActionListeners(), ClassCastException, Component
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected String paramString()
See Also:
Component
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processActionEvent(ActionEvent e)
See Also:
Component.enableEvents(long), addActionListener(java.awt.event.ActionListener), ActionListener
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processEvent(AWTEvent e)
See Also:
processActionEvent(java.awt.event.ActionEvent), ActionEvent, Component
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeActionListener(ActionListener l)
See Also:
getActionListeners(), addActionListener(java.awt.event.ActionListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setActionCommand(String command)
See Also:
ActionEvent
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setLabel(String label)
See Also:
getLabel()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags