multiple shots

hi, i’m new to game programming in java, and i made game like space invader before, but now, i’m trying to remake game of Raiden(which is more difficult) and encountered problems like how to do multiple shots.

mainPanel or Board class:

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import javax.swing.ImageIcon;
import javax.swing.JPanel;


public class mainPanel extends JPanel implements Runnable, KeyListener {
   
   public final int NO_MOVE = 0;
   public final int LEFT = 1;
   public final int RIGHT = 2;
   public final int UP = 3;
   public final int DOWN = 4;
   public final int SPEED = 3;
   
   private int[] keys = new int[5];
   
   ImageIcon i = new ImageIcon(getClass().getResource("res/map1.png"));
   Image BG = i.getImage();
   
   ImageIcon p = new ImageIcon(getClass().getResource("res/plane1.gif"));
   Image player = p.getImage();
   
   
   background map = new background(0, 2400-640);
   plane p1;
   
   boolean ingame = true;
   
   public mainPanel(){
      
      p1 = new plane(225, 600);
      
      for(int x = 0;x<5;x++)
         keys[x] = 0; 
      
      setFocusable(true);
      addKeyListener(this);
      
      Thread thread = new Thread(this);
      thread.start();
   }
   
   public void paintComponent(Graphics g){
      super.paintComponent(g);
      map.draw(g, BG);
      p1.draw(g, player);
   }
      
   public void keyUpdate() {
       if(keys[LEFT]>0){
           p1.setDX(p1.getDX()-(1*SPEED));
       }

       if(keys[RIGHT]>0){
          p1.setDX(p1.getDX()+(1*SPEED));
       }

       if(keys[UP]>0){
          p1.setDY(p1.getDY()-(1*SPEED));
       }

       if(keys[DOWN]>0){
          p1.setDY(p1.getDY()+(1*SPEED)); 
       }
   }

   @Override
   public void run() {
      
      while(ingame){
         p1.update();
         keyUpdate();
         map.update();
         repaint();
         try {
            Thread.sleep(20);
         } catch (InterruptedException e) {
            e.printStackTrace();
         }
      }
   }

   @Override
   public void keyTyped(KeyEvent arg0) {
      // TODO Auto-generated method stub
      
   }
   
   public void keyPressed(KeyEvent e){
      if (e.getKeyCode() == KeyEvent.VK_LEFT){
         keys[LEFT]++;
      } else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
         keys[RIGHT]++;
      } else if (e.getKeyCode() == KeyEvent.VK_UP) {
         keys[UP]++;
      } else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
         keys[DOWN]++;
      }
      if(e.getKeyCode() == KeyEvent.VK_SPACE){
         System.out.println("SPACE");
         p1.shot();
      }
         
   }
   
   public void keyReleased(KeyEvent e){
      if (e.getKeyCode() == KeyEvent.VK_LEFT){
         keys[LEFT]=0;
      } else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
         keys[RIGHT]=0;
      } else if (e.getKeyCode() == KeyEvent.VK_UP) {
         keys[UP]=0;
      } else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
         keys[DOWN]=0;
      }
      if(e.getKeyCode() == KeyEvent.VK_SPACE){
      }
   }
   
}

plane class

import java.awt.Graphics;
import java.awt.Image;



public class plane {
   
   private final int MAX_SHOT = 20;
   
   private int dX;
   private int dY;
   private int sX=5;
   private int sY=7;
   private int count=-1;
   bullet shot1= new bullet();
   bullet shot2[];
   
   private boolean isAlive = true;
   
   public plane(int x, int y){
      dX = x;
      dY = y;
      isAlive = true;
      
      shot2 = new bullet[MAX_SHOT];
      for(int i=0; i<MAX_SHOT;i++)
         shot2[i] = new bullet();
   }
   
   public void setDX(int x){dX = x;}
   public void setDY(int y){dY = y;}
   public void setSX(int x){sX = x;}
   public void setSY(int y){sY = y;}
   public int getDX(){return dX;}
   public int getDY(){return dY;}
   public int getSX(){return sX;}
   public int getSY(){return sY;}
   
   public void setAlive(boolean t){
      isAlive = t;
   }
   public boolean getAlive(){
      return isAlive;
   }
   
   public void setShot(){
      for(int j=0;j<MAX_SHOT;j++){
         if(shot2[j].getDY() < 0){
            shot2[j].setShot(false);
         }
      }
      for(int i=0;i<MAX_SHOT;i++){
         if(shot2[i].isShot() == false){
            shot2[i].setDX(dX+20);
            shot2[i].setDY(dY+20);
         }
      }
   }
   
   public void shot(){
      count++;
   }
   
   public void update(){
      
      if(count > MAX_SHOT)
         count=-1;
      
      if(count>=0 && count <MAX_SHOT){
         if(shot2[count].isShot() == false)
            shot2[count].setShot(true);
      }
      for(int i = 0; i<MAX_SHOT;i++)
         shot2[i].update();
      setShot();
   }
   
   public void draw(Graphics g, Image img){
      if(isAlive){
         g.drawImage(img, dX, dY, dX+40, dY+40, sX, sY, sX+50, sY+42, null);
         for(int i=0; i<MAX_SHOT;i++)
            shot2[i].draw(g);
      }
   }
   

}

bullet class

import java.awt.Color;
import java.awt.Graphics;


public class bullet {
   
   private int dX;
   private int dY;
   private int sX;
   private int sY;
   
   private boolean isShot = false;
   public boolean isShot() {return isShot;}
   public void setShot(boolean isShot) {this.isShot = isShot;}

   private int speed=4;
   public void setSpeed(int s){speed = s;}
   
   public void setDX(int x){dX = x;}
   public void setDY(int y){dY = y;}
   public void setSX(int x){sX = x;}
   public void setSY(int y){sY = y;}
   public int getDX(){return dX;}
   public int getDY(){return dY;}
   public int getSX(){return sX;}
   public int getSY(){return sY;}
   
   public void update(){
      if(isShot == true)
         dY-=speed;
   }
   
   public void draw(Graphics g){
      if(isShot == true)
         g.setColor(Color.WHITE);
         g.fillRect(dX, dY, 2, 10);
   }

}