두 개 이상의 버튼이있는 경우 어떤 버튼을 클릭했는지 파악할 수 있을지 궁금합니다.AspectJ에서 하나 이상의 버튼을 클릭하는 경우 버튼을 클릭하는 방법?
이 예제에서 joinPoints를 사용하여 something1을 수행하고 // something2 부분을 수행 할 수 있습니까?
public class Test {
public Test() {
JButton j1 = new JButton("button1");
j1.addActionListener(this);
JButton j2 = new JButton("button2");
j2.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
//if the button1 clicked
//do something1
//if the button2 clicked
//do something2
}
}