ActionEvent, ActionEvent클래스의 주요 멤버필드, ActionEvent클래스의 주요 메소드, ActionListener, ActionListener 인테페이스의 주요 메서드

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

컴포넌트에서 액션 이벤트가 발생했을 때 리스너에 의해 호출되는 메소드

 

 

반응형