I've sucessfully improved my item dragging by
Replacing my whole mouseDragged method with
Code:
public final void mouseDragged(MouseEvent mouseevent)
{
int i = mouseevent.getX();
int j = mouseevent.getY();
if(gameFrame != null)
{
i -= 4;
j -= 22;
}
if (System.currentTimeMillis() - clickTime >= 250L
|| Math.abs(saveClickX - i) > 5 || Math.abs(saveClickY - j) > 5) {
idleTime = 0;
mouseX = i;
mouseY = j;
}
}
And my whole mouseMoved method with
Code:
public final void mouseMoved(MouseEvent mouseevent)
{
int i = mouseevent.getX();
int j = mouseevent.getY();
if(gameFrame != null)
{
i -= 4;
j -= 22;
}
if (System.currentTimeMillis() - clickTime >= 250L
|| Math.abs(saveClickX - i) > 5 || Math.abs(saveClickY - j) > 5) {
idleTime = 0;
mouseX = i;
mouseY = j;
}
}
There was a significant difference, but items are still a little draggy, how may I tweek this so items are less sensitive and smooth switching?