this.method() for JFrame makes an error and says "cannot find symbol"

I was making a frame with buttons but after putting in some code for the action listeners, all my code that looked like "this.method()" returned an error saying that the subject couldn't be found. I don't know what I did wrong but to a novice like myself, the code looks fine.

  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.ImageIcon;
  import javax.swing.BorderFactory;
  import java.awt.Color;
  public class Frame extends Main implements ActionListener
  {
    JButton button1;
    JButton button2;
    JButton button3;
    JButton button4;
    JButton button5;
    JButton ReDeal;
    String t1;
    String t2;
    String t3;
    String t4;
    String t5;
    boolean hold1 = false;
    boolean hold2 = false;
    boolean hold3 = false;
    boolean hold4 = false;
    boolean hold5 = false;
    int ID1;
    int ID2;
    int ID3;
    int ID4;
    int ID5;
     public Frame(String x,String y,String z,String w,String t,int a,int b,int c,int d,int e)
    {
    //this is the constructor class
    t1 = x;
    t2 = y;
    t3 = z;
    t4 = w;
    t5 = t;
    ID1 = a;
    ID2 = b;
    ID3 = c;
    ID4 = d;
    ID5 = e;
    button1 = new JButton();
    button2 = new JButton();
    button3 = new JButton();
    button4 = new JButton();
    button5 = new JButton();
    ReDeal = new JButton();
    button1.setBounds(0,100,75,150);
    button2.setBounds(100,100,75,150);
    button3.setBounds(200,100,75,150);
    button4.setBounds(300,100,75,150);
    button5.setBounds(400,100,75,150);
    ReDeal.setBounds(250,300,150,90);
    button1.setBorder(BorderFactory.createLineBorder(Color.black));
    button2.setBorder(BorderFactory.createLineBorder(Color.black));
    button3.setBorder(BorderFactory.createLineBorder(Color.black));
    button4.setBorder(BorderFactory.createLineBorder(Color.black));
    button5.setBorder(BorderFactory.createLineBorder(Color.black));
    button1.setText(t1);
    button2.setText(t2);
    button3.setText(t3);
    button4.setText(t4);
    button5.setText(t5);
    ReDeal.setText("ReDeal!");
    button1.setBorder(BorderFactory.createLineBorder(Color.black));
    button2.setBorder(BorderFactory.createLineBorder(Color.black));
    button3.setBorder(BorderFactory.createLineBorder(Color.black));
    button4.setBorder(BorderFactory.createLineBorder(Color.black));
    button5.setBorder(BorderFactory.createLineBorder(Color.black));
    button1.addActionListener(this);
    button2.addActionListener(this);
    button3.addActionListener(this);
    button4.addActionListener(this);
    button5.addActionListener(this);
    ReDeal.addActionListener(this);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setLayout(null);
    this.setSize(500,500);
    this.setVisible(true);
    this.add(button1);
    this.add(button2);
    this.add(button3);
    this.add(button4);
    this.add(button5);
    this.add(ReDeal);
}
public void actionPerformed(ActionEvent e) //All actions are controlled here
{
    if(e.getSource()==button1)
    {
        if(hold1==false)
        {
            hold1=true;
            button1.setBorder(BorderFactory.createLineBorder(Color.red));
        } else if(hold1==true)
        {
            hold1=false;
            button1.setBorder(BorderFactory.createLineBorder(Color.black));
        }
    }
    if(e.getSource()==button2)
    {
        if(hold2==false)
        {
            hold2=true;
            button2.setBorder(BorderFactory.createLineBorder(Color.red));
        } else if(hold2==true)
        {
            hold2=false;
            button2.setBorder(BorderFactory.createLineBorder(Color.black));
        }
    }
    if(e.getSource()==button3)
    {
        if(hold3==false)
        {
            hold3=true;
            button3.setBorder(BorderFactory.createLineBorder(Color.red));
        } else if(hold3==true)
        {
            hold3=false;
            button3.setBorder(BorderFactory.createLineBorder(Color.black));
        }
    }
    if(e.getSource()==button4)
    {
        if(hold4==false)
        {
            hold4=true;
            button4.setBorder(BorderFactory.createLineBorder(Color.red));
        } else if(hold4==true)
        {
            hold4=false;
            button4.setBorder(BorderFactory.createLineBorder(Color.black));
        }
    }
    if(e.getSource()==button5)
    {
        if(hold5==false)
        {
            hold5=true;
            button5.setBorder(BorderFactory.createLineBorder(Color.red));
        } else if(hold5==true)
        {
            hold5=false;
            button5.setBorder(BorderFactory.createLineBorder(Color.black));
        }
    }
    if(e.getSource()==ReDeal)
    {
        int r;
        int x = 5;
        int[] ReCheck = new int[]{ID1,ID2,ID3,ID4,ID5,-1,-1,-1,-1,-1};
        if(hold1==false)
        {
            r = rand.nextInt(51);
            while(r == ID1||r==ID2||r==ID3||r==ID4||r==ID5||r==ReCheck[5]||r==ReCheck[6]||r==ReCheck[7]||r==ReCheck[8]||r==ReCheck[9])
            {
                r = rand.nextInt(51);
            }
            Hand[0] = Deck[r];
            ReCheck[x] = r;
            button1.setText(Hand[r].toString());
            x++;
        }
        if(hold2==true)
        {
            r = rand.nextInt(51);
            while(r == ID1||r==ID2||r==ID3||r==ID4||r==ID5||r==ReCheck[5]||r==ReCheck[6]||r==ReCheck[7]||r==ReCheck[8]||r==ReCheck[9])
            {
                r = rand.nextInt(51);
            }
            Hand[0] = Deck[r];
            ReCheck[x] = r;
            button2.setText(Hand[r].toString());
            x++;
        }
        if(hold3==true)
        {
            r = rand.nextInt(51);
            while(r == ID1||r==ID2||r==ID3||r==ID4||r==ID5||r==ReCheck[5]||r==ReCheck[6]||r==ReCheck[7]||r==ReCheck[8]||r==ReCheck[9])
            {
                r = rand.nextInt(51);
            }
            Hand[0] = Deck[r];
            ReCheck[x] = r;
            button3.setText(Hand[r].toString());
            x++;
        }
        if(hold4==true)
        {
            r = rand.nextInt(51);
            while(r == ID1||r==ID2||r==ID3||r==ID4||r==ID5||r==ReCheck[5]||r==ReCheck[6]||r==ReCheck[7]||r==ReCheck[8]||r==ReCheck[9])
            {
                r = rand.nextInt(51);
            }
            Hand[0] = Deck[r];
            ReCheck[x] = r;
            button4.setText(Hand[r].toString());
            x++;
        }
        if(hold5==true)
        {
            r = rand.nextInt(51);
            while(r == ID1||r==ID2||r==ID3||r==ID4||r==ID5||r==ReCheck[5]||r==ReCheck[6]||r==ReCheck[7]||r==ReCheck[8]||r==ReCheck[9])
            {
                r = rand.nextInt(51);
            }
            Hand[0] = Deck[r];
            ReCheck[x] = r;
            button5.setText(Hand[r].toString());
            x++;
        }
        ReDeal.setVisible(false);
    }
}

I know there's a lot going on here and I'm sorry if this is hard to read (this is my first time posting on here). The lines that get errors start with "this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);" and go down to "this.add(ReDeal);" If anybody can help with this it would be much appreciated.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum