鍍金池/ 教程/ Java/ SWING ActionEvent事件類
Swing JRadioButton
Swing Layout布局
Swing JTextField
Swing JLabel
Swing開發(fā)環(huán)境安裝
Swing JComponent類
SWING ActionEvent事件類
Swing JScrollBar
Swing教程首頁(yè)
Swing JFileChooser
SWING ContainerEvent事件處理類
Swing AdjustmentListener接口
Swing WindowAdapter類
SWING ComponentListener接口
Swing JMenuBar類
Swing JPanel類及實(shí)例
Swing
SWING AdjustmentEvent事件處理
Swing JWindow類及實(shí)例
Swing介紹
Swing MouseMotionAdapter類
SWING WindowEvent事件類
Swing ItemListener接口
SWING MouseEvent事件類
Swing JMenu類
SWING KeyEvent事件類
Swing MouseMotionListener接口
Swing JProgressBar
SWING AWTEvent事件類
Swing JRadioButtonMenuItem類及例子
Swing KeyAdapter類
SWING ActionListener接口
Swing LayoutManager接口
SWING MouseMotionEvent事件處理
Swing Component類
Swing Container類
Swing CardLayout布局
Swing MouseAdapter類
Swing JSlider
Swing KeyListener接口
Swing FocusAdapter類
Swing JColorChooser
Swing ImageIcon
Swing JComboBox
Swing GroupLayout布局類
Swing JOptionPane
Swing GridBagLayout布局類
Swing JMenuItem類
Swing MouseListener Interface
Swing事件適配器
SWING ComponentEvent處理類
SWING PaintEvent事件類
Swing FlowLayout布局類
SWING Event事件類
Swing FocusListener接口
Swing控件
Swing JButton
Swing JCheckBox
Swing SpringLayout布局類
Swing容器
Swing事件處理
Swing事件監(jiān)聽器
Swing Menu菜單類
Swing JList
Swing ContainerListener接口
Swing LayoutManager2接口
Swing JFrame類和實(shí)例
Swing JTextArea
SWING InputEvent事件類
Swing BorderLayout布局
Swing WindowListener接口
Swing JCheckboxMenuItem類及例子
Swing JSpinner
Swing GridLayout布局類
Swing JPopupMenu類及實(shí)例

SWING ActionEvent事件類

這個(gè)類定義在 java.awt.event包。按鈕被點(diǎn)擊時(shí),會(huì)生成ActionEvent雙擊或列表中的項(xiàng)目。

類聲明

以下是聲明 java.awt.event.ActionEvent類:

public class ActionEvent
   extends AWTEvent

字段域

以下是java.awt.event.ActionEvent類字段域:

  • static int ACTION_FIRST -- The first number in the range of ids used for action events.

  • static int ACTION_LAST -- The last number in the range of ids used for action events.

  • static int ACTION_PERFORMED -- This event id indicates that a meaningful action occured.

  • static int ALT_MASK -- The alt modifier.

  • static int CTRL_MASK -- The control modifier.

  • static int META_MASK -- The meta modifier.

  • static int SHIFT_MASK -- The shift modifier.

類構(gòu)造函數(shù)

S.N. 構(gòu)造函數(shù) & 描述
1 ActionEvent(java.lang.Object source, int id, java.lang.String command)
Constructs an ActionEvent object.
2 ActionEvent(java.lang.Object source, int id, java.lang.String command, int modifiers)
Constructs an ActionEvent object with modifier keys.
3 ActionEvent(java.lang.Object source, int id, java.lang.String command, long when, int modifiers)
Constructs an ActionEvent object with the specified modifier keys and timestamp.

類方法

S.N. 方法 & 描述
1 java.lang.String getActionCommand()
Returns the command string associated with this action.
2 int getModifiers()
Returns the modifier keys held down during this action event.
3 long getWhen()
Returns the timestamp of when this event occurred.
4 java.lang.String paramString()
Returns a parameter string identifying this action event.

方法繼承

這個(gè)類從以下類繼承的方法:

  • java.awt.AWTEvent

  • java.util.EventObject

  • java.lang.Object