본문 바로가기
GUI

[6] Listener | Mouse, Motion, Action, Key 등

by TR. 2021. 1. 14.

Listener  |  MouseListener, MouseMotionListener, ActionListener, KeyListener ...

ㄴ 발생하는 이벤트를 가져올 수 있음

 

  1. Listener 인터페이스를 상속받음 
    ㄴ method overiding
  2. 필요한 Container 또는 Component에 Listener를 달아줌
     add***Listener(this)
  3. 오버로드한 메소드를 작성




'GUI' 카테고리의 다른 글

[7] 네모 그리기  (0) 2021.01.14
[4] Component | Jbutton  (0) 2021.01.12
[3] Container와 Component  (0) 2021.01.12
[2] JPanel | Container  (0) 2021.01.07
[1] JFrame | Top-level Container  (0) 2021.01.07

댓글