the getSource() and getActionCommand()

前端 未结 4 1430
庸人自扰
庸人自扰 2021-02-02 11:04

What is getSource? and what does it return?

and what is getActionCommand() and what does it return??

I am getting confused between these two can anyone give or d

4条回答
  •  北海茫月
    2021-02-02 11:40

    The getActionCommand() method returns an String associated with that Component set through the setActionCommand() , whereas the getSource() method returns an Object of the Object class specifying the source of the event.

提交回复
热议问题