So I've created a bullet class: 

package javagame.states;

import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.geom.Vector2f;
import org.newdawn.slick.state.StateBasedGame;

public class Bullet {

private Vector2f pos;
private Vector2f speed;
private int lived = 0;
 
private boolean aktiv = true;
 
private static int MAX_LIFETIME = 2000;
 
public Bullet (Vector2f pos, Vector2f speed){
this.pos = pos;
this.speed = speed;
}

public Bullet(){
aktiv = false;
}
 
public void update(int t){

rotation++;

if(aktiv){
Vector2f realSpeed = speed.copy();
realSpeed.scale((t/1000.0f));
pos.add(realSpeed);
 
lived += t;
if(lived > MAX_LIFETIME) aktiv = false;
}
}

public void init(GameContainer gc, StateBasedGame sbg) throws SlickException{
}
 
public void render(GameContainer gc, Graphics g) throws SlickException {

if(aktiv){
g.setColor(Color.red);
g.fillOval(pos.getX(), pos.getY(), radius * 2, radius *2);
}
}
 
public boolean isAktiv(){
return aktiv;
}
}


then called this class here in my robot class:

package javagame.states;

import java.util.Iterator;
import java.util.LinkedList;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.geom.Vector2f;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;

public class Robot2 extends BasicGameState{

private LinkedList<Bullet> bullets;

@Override
public void init(GameContainer gc, StateBasedGame sbg) throws SlickException {
bullets = new LinkedList<Bullet>();
}

@Override
public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException {
for(Bullet b : bullets){
b.render(gc, g);
}
}

@Override
public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException {
Iterator<Bullet> i = bullets.iterator();
while(i.hasNext()){
Bullet b = i.next();
if(b.isAktiv()){
b.update(delta);
}else{
i.remove();
}
}

Input input = gc.getInput();
int mouseX = input.getMouseX();
int mouseY = input.getMouseY();

int xDistance = (int) (RobotX() + Robotwidth() / 2 - mouseX);
int yDistance = (int) (RobotY() + Robotheight() / 2 - mouseY);
double angleToTurn = Math.toDegrees(Math.atan2(yDistance, xDistance));

    if(mouseX != 0){
    angleToTurn += 270;
    }else{
    if(mouseY != 0)
    angleToTurn += 180;
    }
    robot.setRotation((float) angleToTurn); //robot is an image. didn't included the code here to shorten my codes

if(gc.getInput().isMousePressed(Input.MOUSE_LEFT_BUTTON)){
bullets.add(new Bullet(new Vector2f(Sprites.getRobotX(), Sprites.getRobotY()), new Vector2f(mouseX, mouseY)));
}
}

@Override
public int getID() {
return States.ROBOT2;
}

}

the robot is rotating perfectly according to mouse's cursor but when I hit the mouse's left button to fire a bullet, it doesn't follow the mouse's cursor location. This is what I've got when i run these codes and pressing the left button of my mouse.
/images/forum/upload/2014-12-05/a867f80b93382bbfef0c17437593315b.jpg
What I want to achieve is to correct the direction of the bullet according to mouse cursor location.

Any help would be much appreciated. Thank you very much.