How can I determine if a certain JButton has been pressed in java? I have 2 buttons and depending on which button is pressed a different a value could be true or false.
boolean value = true;
if (event.getSource() == a)
{
value == true;
}
else if (event.getSource() == b)
{
value == false;
}
right now no matter which button is pressed the value is false