can any1 please help me re-write this code

with mouseClicked instead of mousedown which is depreciated

thanks

public boolean mouseUp(Event e, int x, int y)

{
if (y == 0)
{
swit = true;
return true;
}

else if (pics[getMC(x,y)].getID() > rw*col/2)
return true;

else if (0 == track)
{
card1 = pics[getMC(x,y)];
start = new Date();
etime.start();
track = 2;
stat = "Choose Second Card";
repaint();
return true;
}

else if (1 == track)
{
card1 = pics[getMC(x,y)];
track = 2;
stat = "Choose Second Card";
repaint();
return true;
}

else if (2 == track)
{
if (card1 == pics[getMC(x,y)]) return true;
card2 = pics[getMC(x,y)];
track = 3;
attempts++;
if (card1.getID() == card2.getID())
{
stat = "well done";
matched++;
if (rw*col/2 == matched)
{
stat = "finished";
etime = null ;
}
}
else
stat = "Try Again";
repaint();
return true;
}

else
return false;
}