How do I make a Image jump in Java
<p>I need help to make a character jump in java.
This is my main class</p>

<p>Board.java</p>

<pre><code>package com.mime.mario;

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;

import com.mime.mario.graphics.Background;
import com.mime.mario.graphics.BasicImages;
import com.mime.mario.graphics.Grass; 
import com.mime.mario.graphics.Player;

public class Board extends JPanel implements MouseListener, ActionListener {
private static final long serialVersionUID = 1L;
BasicImages bi;
Background b;
Grass g1;
Player p;
Timer time;
int i = 0;
Font font = new Font("Arial", Font.BOLD, 20);
String score = "Score = " + i;
public Board() {
bi = new BasicImages();
g1 = new Grass();
b = new Background();
p = new Player();
time = new Timer(5, this);
time.start();
addMouseListener(this);
addKeyListener(new Al());
setFocusable(true);

}

public void actionPerformed(ActionEvent e) {
repaint();
}

public void paint(Graphics g) {
g.drawImage(b.getBackground(), 0, 0, null);
// prints the walls
for (int x = 50; x &lt; 896; x += 128) {
    g.drawImage(bi.getWall(), x, 120, null);
}
for (int x = 480; x &lt; 700; x += 64) {
    g.drawImage(bi.getWall(), x, 350, null);
}
// prints the coins
for (int x = 100; x &lt; 900; x += 128) {
    g.drawImage(bi.getCoin(), x, 100, null);
}
// prints the grass
for (int x = -20; x &lt; 960; x += 64) {
    for (int y = 520; y &lt; 590; y += 64) {
    g.drawImage(g1.getGrass(), x, y, null);
    }
}
g.drawImage(p.getPlayer(),p.getX(),p.getY(),null);
g.setFont(font);
g.drawString(score, 416, 64);

}

public void mouseClicked(MouseEvent e) {
i++;
score = "Score = " + i;
repaint();
}

public void mousePressed(MouseEvent e) {

}

public void mouseReleased(MouseEvent e) {

}

public void mouseEntered(MouseEvent e) {

}

public void mouseExited(MouseEvent e) {

}

public class Al extends KeyAdapter {
Rectangle nextlevel = new Rectangle(900, 430, 32, 700);
Rectangle player = new Rectangle(p.getX(), p.getY(), 44, 77);

public void keyPressed(KeyEvent e) {

    int keycode = e.getKeyCode();
    if (keycode == KeyEvent.VK_LEFT) {
    p.move(-32, 0);
    }
    if (keycode == KeyEvent.VK_RIGHT) {
    if (!player.intersects(nextlevel)) {
        p.move(32, 0);

    }

    }
    if (keycode == KeyEvent.VK_UP) {
    p.move(0, -32);
    }
    if (keycode == KeyEvent.VK_DOWN) {
    p.move(0, 32);
    }
    if (keycode == KeyEvent.VK_SPACE) {
    p.move(0, -32);


    }

    if (player.intersects(nextlevel)) {
    System.out.println("gshjfkjasf");

    }

    repaint();
}

public void keyRelased(KeyEvent e) {
    p.move(0, 0);
}
}
</code></pre>

<p>Other Class:
Player.java</p>

<pre><code>package com.mime.mario.graphics;

import java.awt.Image;

import javax.swing.ImageIcon;

public class Player {
public int x = 75;
public int y =460;

ImageIcon img = new ImageIcon("C://Games//Mario//Characters//mario temporary.png");
public Image mario = img.getImage();

public Image getPlayer() {
return mario;
}
public void move(int dx, int dy){

x+=dx;
y+=dy;
}
public int getX(){
return x;
}
public int getY(){
return y;
}
}
</code></pre>

<p>I know this is really long but if you could take the time just to look over it and tell me how to make the character jump I would be really grateful.
Thank you! Please help me!</p>
