I have this function which I want to call with this: MouseHover("btnAttackHover.png",btnAttack);
Image btnAttack;
public void MouseHover(String i,Image e){
ImageIcon btn = new ImageIcon("src/images/btn/"+i);
e = btn.getImage();
}
When I call it,this should change the image and draw this:
g.drawImage(btnAttack,100,100,100,100,null);
But the e = btn.getImage();
doesn't work.
How can I pass the Image Object "btnAttack"?