Is it possible to change a variable from inside of a ActionListener
?
I mean somthing like this:
boolean test = false;
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
test = true;
}
});
I want to change test
to true when someone presses the button.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…