public void mouseClicked(MouseEvent e) { x = -1; y = -1; width = -1; height = -1; drawable.repaint(); }
public void mouseDragged(MouseEvent e) { if (x == -1) { return; } width = e.getX() - x; height = e.getY() - y; drawable.repaint(); }