728x90
이벤트 종류 | 리스너 인터페이스 | 리스너의 추상 메소드 | 메소드가 호출되는 경우 |
Action | ActionListener | void actionPerformed(ActionEvent) | Action 이벤트가 발생하는 경우 |
Item | ItemListener | void itemStateChanged(ItemEvent) | Item 이벤트가 발생하는 경우 |
Key | KeyListener | void keyPressed(KeyEvent) | 모든 키에 대해 키가 눌러질 때 |
void keyReleased(KeyEvent) | 모든 키에 대해 눌러진 키가 떼어질 때 | ||
void keyTyped(KeyEvent) | 유니코드 키가 입력될 때 | ||
Mouse | MouseListener | void mousePressed(MouseEvent) | 마우스 버튼이 눌러질 때 |
void mouseReleased(MouseEvent) | 눌러진 마우스 버튼이 떼어질 때 | ||
void mouseClicked(MouseEvent) | 마우스 버튼이 클릭될 때 | ||
void mouseEntered(MouseEvent) | 마우스가 컴포넌트 위에 올라갈 때 | ||
void mouseExited(MouseEvent) | 컴포넌트 위에 올라간 마우스가 컴포넌트를 벗어날 때 | ||
Mouse | MouseMotionListener | void mouseDragged(MouseEvent) | 마우스를 컴포넌트 위에서 드래그할 때 |
void mouseMoved(MouseEvent) | 마우스가 컴포넌트 위에서 움직일 때 | ||
Focus | FocusListener | void focusGained(FocusEvent) | 컴포넌트가 포커스를 받을 때 |
void focusLost(FocusEvent) | 컴포넌트가 포커스를 잃을 때 | ||
Text | TextListener | void textValueChanged(TextEvent) | 텍스트가 변경될 때 |
Window | WindowListener | void windowOpened(WindowEvent) | 윈도우가 생성되어 처음으로 보이게 될 때 |
void windowClosing(WindowEvent) | 윈도우의 시스템 메뉴에서 윈도우 닫기를 시도할 때 | ||
void windowIconfied(WindowEvent) | 윈도우가 아이콘화될 때 | ||
void windowDeiconfied(WindowEvent) | 아이콘 상태에서 원래 상태로 복귀할 때 | ||
void windowClosed(WindowEvent) | 윈도우가 닫혔을 때 | ||
void windowActivated(WindowEvent) | 윈도우가 활성화 되었을 때 | ||
void windowDeactivated(WindowEvent) | 윈도우가 비활성화 되었을 때 | ||
Adjustment | AdjustmentListener | void adjustmentValueChanged(AdjustmentEvent) | 스크롤바를 움직일 때 |
Component | ComponentListener | void componentHidden(ComponentEvent) | 컴포넌트가 보이지 않는 상태로 될 때 |
void componentShown(ComponentEvent) | 컴포넌트가 보이는 상태로 될 때 | ||
void componentResized(ComponentEvent) | 컴포넌트의 크기가 변경될 때 | ||
void componentMoved(ComponentEvent) | 컴포넌트의 위치가 변경될 때 | ||
Container | ContainerListener | void componentAdded(ContainerEvent) | 컴포넌트가 컨테이너에 추가될 때 |
void componentRemoved(ContainerEvent) | 컴포넌트가 컨테이너에서 삭제될 때 |
'Language > Java' 카테고리의 다른 글
[Java] 할당 연산자 (assignment operators) (0) | 2022.08.22 |
---|---|
[Java] 기본 데이터 타입 크기 (0) | 2022.08.22 |
[Java] 이벤트 객체와 이벤트 소스 (0) | 2022.08.21 |
[Java] JDK에서 제공하는 어댑터 클래스 (0) | 2022.08.21 |
[Java] 정리 (클래스와 객체...) (0) | 2022.08.21 |