最初のActionListener(About)を2番目のActionListener(About2)にコピーせずに、最初のActionListener(About)を2番目のActionListener(About2)に使用したいのですが、それを行う方法はありますか?
About.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent ae){
AboutMe.setLocation(470,250);
AboutMe.setSize(400, 200);
AboutMe.setVisible(true);
AboutMe.setResizable(false);
AboutMe.add(panel5);
panel5.setLayout(null);
panel5.add(ta);
ta.setBounds(15, 15, 350, 130);
ta.setBorder(BorderFactory.createEtchedBorder());
ta.setText("...................................\n"
+ "....................................\n"
+ "....................................\n"
+ "....................................\n"
+ "....................................");
ta.setEditable(false);
}
}
);
About2.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent ae){
////////code here///////////////
}
}
);