import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.Event.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.*;
import javax.swing.*;
public class GUIBasedCalc extends JFrame implements ActionListener{
public GUIBasedCalc() {
super("Calculator");
setSize(200, 400);
setResizable(false);
super.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
super.setVisible(true);
int number1;
int number2;
boolean num1; //the booleans i need **HELP** with, **HELP** does final make the boolean unchangable (for ex: false to true)
boolean num2;
boolean operater;
JPanel dis = new JPanel();
JPanel sign = new JPanel();
JPanel nums = new JPanel();
JPanel nums1 = new JPanel();
JPanel nums2 = new JPanel();
GridLayout calc = new GridLayout(1, 3);
GridLayout calc1 = new GridLayout(1, 3);
GridLayout calc2 = new GridLayout(1, 3);
GridLayout sign1 = new GridLayout(1, 3);
FlowLayout lay = new FlowLayout();
setLayout(lay);
final JTextArea disply = new JTextArea(1, 8);
disply.setEditable(false);
JButton one = new JButton("1");
//Add action listener to button
one.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
if (num1 == true) { //wants me to make the boolean a final, but i still need to change it **HELP**
disply.setText("1");
int number1 = 1;
this.num1 = false; // changing the boolean to false **HELP**
} else if (operater = true){
disply.setText("Please choose an operater");
if (operater = false) {
disply.setText("1");
int number2 = 2;
this.num2 = false; //trying to change boolean to false **HELP**
}
}
}
});
thats my code, please help me thanks

how i feel when it does not work