CODEDRAGON ㆍDevelopment/Java
ActionEvent
· ActionEvent는 버튼이 눌렸거나, 리스트, 메뉴 등의 컴포넌트가 선택이 되었을 때 발생하는 이벤트입니다.
· 텍스트 필드(TextField)에서 엔터를 쳤을 때도 발생됩니다.
ActionEvent클래스의 주요 멤버필드
|
필드명 |
키 |
|
static int ALT_MASK |
Alt 키 |
|
static int CTRL_MASK |
Ctrl 키 |
|
static int SHIFT_MASK |
Shift 키 |
ActionEvent클래스의 주요 메소드
|
메소드 |
설명 |
|
String getActionCommand() |
Action을 발생시킨 객체의 명령 문자열을 얻어옵니다. |
|
int getModifiers() |
이벤트가 발생되었을 때 같이 사용된 modifier키(Alt키, Ctrl키, Shift키)를 얻어옵니다. |
ActionListener
ActionEvent를 처리하는 이벤트 리스너
ActionListener 인테페이스의 주요 메서드
|
메소드 |
설명 |
|
void actionPerformed(ActionEvent e |
컴포넌트에서 액션 이벤트가 발생했을 때 리스너에 의해 호출되는 메소드 |
'Development > Java' 카테고리의 다른 글
| ItemEvent, ItemEvent클래스의 주요 멤버필드, ItemEvent클래스의 주요 메소드, ItemListener, ItemListener 인터페이스의 주요 메소드, Choice vs List (ItemListener) (0) | 2017.10.20 |
|---|---|
| AdjustmentEvent, AdjustmentListener (0) | 2017.10.19 |
| ActionListener vs TextListener (TextField) (0) | 2017.10.19 |
| 이벤트 리스너 종류 (0) | 2017.10.19 |
| 이벤트 리스너(Event Linstenr), 이벤트 리스너 관련 메소드 (0) | 2017.10.19 |